public function PhpProcess::run

Runs the process.

@api

Parameters

Closure|string|array $callback A PHP callback to run whenever there is some: output available on STDOUT or STDERR

Return value

integer The exit status code

Overrides Process::run

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/PhpProcess.php, line 67

Class

PhpProcess
PhpProcess runs a PHP script in an independent process.

Namespace

Symfony\Component\Process

Code

public function run($callback = null) {
  if (null === $this
    ->getCommandLine()) {
    if (false === ($php = $this->executableFinder
      ->find())) {
      throw new \RuntimeException('Unable to find the PHP executable.');
    }
    $this
      ->setCommandLine($php);
  }
  return parent::run($callback);
}