Symfony\Component\Process\Process::getOutput PHP Méthode

getOutput() public méthode

Returns the current output of the process (STDOUT).
public getOutput ( ) : string
Résultat string The process output
    public function getOutput()
    {
        $this->readPipesForOutput(__FUNCTION__);
        if (false === ($ret = stream_get_contents($this->stdout, -1, 0))) {
            return '';
        }
        return $ret;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function check()
 {
     if (!$this->isSuccessful()) {
         // on some systems stderr is used, but on others, it's not
         throw new LintingException($this->process->getErrorOutput() ?: $this->process->getOutput(), $this->process->getExitCode());
     }
 }
All Usage Examples Of Symfony\Component\Process\Process::getOutput