think\Process::__construct PHP Méthode

__construct() public méthode

构造方法
public __construct ( string $commandline, string | null $cwd = null, array $env = null, string | null $input = null, integer | float | null $timeout = 60, array $options = [] )
$commandline string 指令
$cwd string | null 工作目录
$env array 环境变量
$input string | null 输入
$timeout integer | float | null 超时时间
$options array proc_open的选项
    public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = [])
    {
        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 = $cwd;
        if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || '\\' === DS)) {
            $this->cwd = getcwd();
        }
        if (null !== $env) {
            $this->setEnv($env);
        }
        $this->input = $input;
        $this->setTimeout($timeout);
        $this->useFileHandles = '\\' === DS;
        $this->pty = false;
        $this->enhanceWindowsCompatibility = true;
        $this->enhanceSigchildCompatibility = '\\' !== DS && $this->isSigchildEnabled();
        $this->options = array_replace(['suppress_errors' => true, 'binary_pipes' => true], $options);
    }