public function mustRun(callable $callback = null) { if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'); } if (0 !== $this->run($callback)) { throw new ProcessFailedException($this); } return $this; }
/** * Runs a process and returns the output. * * @param Process $process * @return string */ public function run(Process $process, $returnOutput = true) { $process->mustRun(); if ($returnOutput) { return $this->getProcessOutput($process); } }