Assetic\Util\Process::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $commandline, string $cwd = null, array $env = null, string $stdin = null, integer $timeout = 60, array $options = [] )
$commandline string The command line to run
$cwd string The working directory
$env array The environment variables
$stdin string The STDIN content
$timeout integer The timeout in seconds
$options array An array of options for proc_open
    public function __construct($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array())
    {
        if (!function_exists('proc_open')) {
            throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
        }

        $this->commandline = $commandline;
        $this->cwd = null === $cwd ? getcwd() : $cwd;
        if (null !== $env) {
            $this->env = array();
            foreach ($env as $key => $value) {
                $this->env[(binary) $key] = (binary) $value;
            }
        } else {
            $this->env = null;
        }
        $this->stdin = $stdin;
        $this->timeout = $timeout;
        $this->options = array_merge(array('suppress_errors' => true, 'binary_pipes' => true, 'bypass_shell' => false), $options);
    }