You are here

public function Process::getIncrementalErrorOutput in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/Process.php \Symfony\Component\Process\Process::getIncrementalErrorOutput()

Returns the errorOutput incrementally.

In comparison with the getErrorOutput method which always return the whole error output, this one returns the new error output since the last call.

Return value

string The process error output since the last call

Throws

LogicException in case the output has been disabled

LogicException In case the process is not started

File

vendor/symfony/process/Process.php, line 548

Class

Process
Process is a thin wrapper around proc_* functions to easily start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function getIncrementalErrorOutput() {
  $this
    ->requireProcessIsStarted(__FUNCTION__);
  $data = $this
    ->getErrorOutput();
  $latest = substr($data, $this->incrementalErrorOutputOffset);
  if (false === $latest) {
    return '';
  }
  $this->incrementalErrorOutputOffset = strlen($data);
  return $latest;
}