本文整理汇总了PHP中Symfony\Component\Process\PhpProcess::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpProcess::__construct方法的具体用法?PHP PhpProcess::__construct怎么用?PHP PhpProcess::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Process\PhpProcess
的用法示例。
在下文中一共展示了PhpProcess::__construct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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('');
}
示例2: __construct
/**
* @param CommandLine $script
* @param ProcessEnvironment $processEnvironment
* @param int|float|null $timeout
* @param string|null $cwd
*/
public function __construct(CommandLine $script, ProcessEnvironment $processEnvironment, $timeout = null, $cwd = null)
{
$this->processEnvironment = $processEnvironment;
parent::__construct((string) $script, null, $this->processEnvironment->exportToEnvsArray());
if (!$timeout) {
$this->setTimeout($timeout);
// compatibility to SF 2.2
if (method_exists($this, 'setIdleTimeout')) {
$this->setIdleTimeout($timeout);
}
}
}