app/Console/Commands/Show.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle(ParserStrategy $parserStratagy)
    {
        $file = $this->option("f");
        $type = $this->option("t");
        $all = $this->option("a");
        $parser = $parserStratagy->getParser($type, ["trim" => 81, "count" => 10]);
        $logs = $parser->parse($file);
        $this->output->note("Log Info");
        if($all || $this->option("d")) {
            $this->tableFromLogs($logs, "day");
        }
        if($all || $this->option("h")) {
            $this->tableFromLogs($logs, "hour");
        }
        if(($type == "apachelog") && ($all || $this->option("m"))) {
            $this->tableFromLogs($logs, "method");
        }
        if(true) {
            $this->tableFromLogs($logs, "data");
        }
    }
public function handle ( ParserStrategy $ parserStratagy ) { $ file = $ this -> option ( " f " ) ; $ type = $ this -> option ( " t " ) ; $ all = $ this -> option ( " a " ) ; $ parser = $ parserStratagy -> getParser ( $ type , [ " trim " => 81 , " count " => 10 ] ) ; $ logs = $ parser -> parse ( $ file ) ; $ this -> output -> note ( " Log Info " ) ; if ( $ all || $ this -> option ( " d " ) ) { $ this -> tableFromLogs ( $ logs , " day " ) ; } if ( $ all || $ this -> option ( " h " ) ) { $ this -> tableFromLogs ( $ logs , " hour " ) ; } if ( ( $ type == " apachelog " ) && ( $ all || $ this -> option ( " m " ) ) ) { $ this -> tableFromLogs ( $ logs , " method " ) ; } if ( true ) { $ this -> tableFromLogs ( $ logs , " data " ) ; } }
Execute the console command.
Execute the console command .