You are here

public function Process::getOutput in Zircon Profile 8

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

Returns the current output of the process (STDOUT).

Return value

string The process output

Throws

LogicException in case the output has been disabled

LogicException In case the process is not started

1 call to Process::getOutput()
Process::getIncrementalOutput in vendor/symfony/process/Process.php
Returns the output incrementally.

File

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

Class

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

Namespace

Symfony\Component\Process

Code

public function getOutput() {
  if ($this->outputDisabled) {
    throw new LogicException('Output has been disabled.');
  }
  $this
    ->requireProcessIsStarted(__FUNCTION__);
  $this
    ->readPipes(false, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true);
  return $this->stdout;
}