Symfony\Component\Process\PhpProcess::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $script, string $cwd = null, array $env = [], integer $timeout = 60, array $options = [] )
$script string The PHP script to run (as a string)
$cwd string The working directory
$env array The environment variables
$timeout integer The timeout in seconds
$options array An array of options for proc_open
    public function __construct($script, $cwd = null, array $env = array(), $timeout = 60, array $options = array())
    {
        parent::__construct(null, $cwd, $env, $script, $timeout, $options);
    }

Usage Example

Example #1
0
 /**
  * Constructor.
  *
  * @param string $documentRoot The document root for the web server.
  *
  * @param string $addr The address hostname for the web server.
  *
  * @param int $port The port to open the web server on.
  */
 public function __construct($documentRoot = null, $addr = 'localhost', $port = 8080)
 {
     $this->executableFinder = new PhpExecutableFinder();
     $this->addr = $addr;
     $this->port = $port;
     $this->documentRoot = $documentRoot;
     parent::__construct('');
 }
All Usage Examples Of Symfony\Component\Process\PhpProcess::__construct