Beispiel #1
0
 /**
  * Execute a basic terminal object
  *
  * @param League\CLImate\TerminalObject $obj
  */
 public function execute($obj)
 {
     $results = $obj->result();
     if (!is_array($results)) {
         $results = [$results];
     }
     foreach ($results as $result) {
         if ($obj->sameLine()) {
             $this->output->sameLine();
         }
         $this->output->write($obj->getParser()->apply($result));
     }
 }
Beispiel #2
0
 /**
  * Execute a basic terminal object
  *
  * @param League\CLImate\TerminalObject $obj
  */
 protected function executeBasic($obj)
 {
     $results = $obj->result();
     if (!is_array($results)) {
         $results = [$results];
     }
     foreach ($results as $result) {
         echo new Output($result, $this->parser);
     }
 }