Symfony\Component\Process\Process::addOutput PHP Method

addOutput() public method

Adds a line to the STDOUT stream.
public addOutput ( string $line )
$line string The line to append
    public function addOutput($line)
    {
        $this->lastOutputTime = microtime(true);
        fseek($this->stdout, 0, SEEK_END);
        fwrite($this->stdout, $line);
        fseek($this->stdout, $this->incrementalOutputOffset);
    }

Usage Example

Example #1
0
 public function addOutput($line)
 {
     parent::addOutput($line);
     $this->consoleOutput .= $line;
 }