Cron\Report\JobReport::addOutput PHP Method

addOutput() public method

public addOutput ( string $line )
$line string
    public function addOutput($line)
    {
        $this->output[] = $line;
    }

Usage Example

Beispiel #1
0
 /**
  * Start the process.
  *
  * @param JobReport $report
  */
 public function run(JobReport $report)
 {
     $this->report = $report;
     $report->setStartTime(microtime(true));
     $this->getProcess()->start(function ($type, $buffer) use($report) {
         if (Process::ERR === $type) {
             $report->addError($buffer);
         } else {
             $report->addOutput($buffer);
         }
     });
 }