当前位置: 首页>>代码示例>>PHP>>正文


PHP Process::__construct方法代码示例

本文整理汇总了PHP中Symfony\Component\Process\Process::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Process::__construct方法的具体用法?PHP Process::__construct怎么用?PHP Process::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Process\Process的用法示例。


在下文中一共展示了Process::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($port, $host)
 {
     $this->port = $port;
     $this->host = $host;
     parent::__construct(sprintf('exec php -dalways_populate_raw_post_data=-1 -derror_log= -S %s -t public/ public/index.php', $this->getConnectionString()), __DIR__ . '/../../../../');
     $this->setTimeout(null);
 }
开发者ID:cosmorogers,项目名称:http-mock,代码行数:7,代码来源:Server.php

示例2: __construct

 public function __construct($script, $duration)
 {
     $this->script = $script;
     $this->initialDuration = $duration;
     $this->enableOutput();
     parent::__construct($script, null, null, null, null, []);
 }
开发者ID:PedroTroller,项目名称:CircleCI-Parallel-Builder,代码行数:7,代码来源:Test.php

示例3: __construct

 /**
  * @param string         $script  Passed to php binary
  * @param string|null    $cwd     The working directory or null to use the working dir of the current PHP process
  * @param array|null     $env     The environment variables or null to inherit
  * @param int|float|null $timeout The timeout in seconds or null to disable
  */
 public function __construct($script, $cwd = null, array $env = null, $timeout = null)
 {
     // By telling PHP to log errors without having a log file, PHP will write
     // errors to STDERR in a specific format (each line is prefixed with PHP).
     $commandline = sprintf('php -d log_errors=1 -d error_log=NULL %s', $script);
     parent::__construct($commandline, $cwd, $env, null, $timeout);
 }
开发者ID:mackensen,项目名称:moodle-plugin-ci,代码行数:13,代码来源:MoodleProcess.php

示例4: __construct

 /**
  * ScenarioProcess constructor.
  *
  * @param ScenarioInfo $scenarioInfo
  * @param null|string  $commandline
  * @param null         $cwd
  * @param array|null   $env
  * @param null         $input
  * @param int          $timeout
  * @param array        $options
  */
 public function __construct(ScenarioInfo $scenarioInfo, $commandline, $cwd = null, array $env = null, $input = null, $timeout = 0, array $options = array())
 {
     $this->scenarioInfo = $scenarioInfo;
     $this->commandLine = $commandline;
     $this->optionCollection = new ProcessOptionCollection();
     parent::__construct($this->getCommandLineWithOptions(), $cwd, $env, $input, $timeout, $options);
 }
开发者ID:tonicforhealth,项目名称:behat-parallel-scenario,代码行数:18,代码来源:ScenarioProcess.php

示例5: prepare

 public function prepare(BehatWrapper $behat, BehatCommand $command, $cwd = null)
 {
     // Build the command line options, flags, and arguments.
     $binary = ProcessUtils::escapeArgument($behat->getBehatBinary());
     $commandLine = rtrim($binary . ' ' . $command->getCommandLine());
     parent::__construct($commandLine, $cwd, null, null, $behat->getTimeout(), array());
 }
开发者ID:alnutile,项目名称:drunatra,代码行数:7,代码来源:BehatProcess.php

示例6: __construct

 public function __construct(Container $container, Container $parent = null)
 {
     $cmd = 'lxc-info -s -n ' . $container->getName();
     if (!empty($parent)) {
         $cmd = 'lxc-attach -n ' . $parent->getName() . ' -- ' . $cmd;
     }
     parent::__construct($cmd);
 }
开发者ID:wackamole0,项目名称:rainmaker-tool,代码行数:8,代码来源:GetContainerStatusProcess.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param string $script The PHP script to run (as a string)
  * @param string|null $cwd The working directory or null to use the working dir of the current PHP process
  * @param array|null $env The environment variables or null to use the same environment as the current PHP process
  * @param int $timeout The timeout in seconds
  * @param array $options An array of options for proc_open
  */
 public function __construct($script, $cwd = null, array $env = null, $timeout = 60, array $options = array())
 {
     $executableFinder = new PhpExecutableFinder();
     if (false === ($php = $executableFinder->find())) {
         $php = null;
     }
     parent::__construct($php, $cwd, $env, $script, $timeout, $options);
 }
开发者ID:edwardricardo,项目名称:zenska,代码行数:17,代码来源:PhpProcess.php

示例8: __construct

 public function __construct($command, $input = NULL)
 {
     parent::__construct($command);
     $this->setInput($input);
     $this->setTimeout(0);
     $this->identifier = md5(uniqid());
     $this->log = new \Nethgui\Log\Nullog();
 }
开发者ID:SystemEd-Jacob,项目名称:nethgui,代码行数:8,代码来源:Process.php

示例9: __construct

 public function __construct($profileName, $profileVersion, $downloadHost = null)
 {
     $cmd = 'rprofmgr profile:download-version --profile-version=' . escapeshellarg($profileVersion);
     if (!empty($downloadHost)) {
         $cmd .= ' --download-host=' . escapeshellarg($downloadHost);
     }
     $cmd .= ' ' . escapeshellarg($profileName);
     parent::__construct($cmd);
 }
开发者ID:wackamole0,项目名称:rainmaker-tool,代码行数:9,代码来源:DownloadProfileVersionRootFs.php

示例10: __construct

 /**
  * Use the Builder to create a environment process
  */
 public function __construct($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array())
 {
     $env = array_replace(array('USERPROFILE' => getenv('HOME')), (array) $env);
     $inherits = array('PATH', 'SystemRoot', 'LOCALAPPDATA', 'SystemDrive', 'SSH_AUTH_SOCK', 'CommonProgramFiles', 'APPDATA', 'COMPUTERNAME', 'TEMP', 'TMP', 'USERNAME', 'PHPRC', 'PHP_PEAR_BIN_DIR', 'PHP_PEAR_PHP_BIN', 'PSC_CMS', 'XDEBUG_CONFIG', 'WEBFORGE');
     foreach ($inherits as $inherit) {
         $env[$inherit] = getenv($inherit);
     }
     parent::__construct($commandline, $cwd, $env, $stdin, $timeout, $options);
 }
开发者ID:pscheit,项目名称:psc-cms,代码行数:12,代码来源:Process.php

示例11: __construct

 /**
  * @param GitWrapper $gitWrapper
  * @param GitCommand $gitCommand
  */
 public function __construct(GitWrapper $gitWrapper, GitCommand $gitCommand)
 {
     $commandLine = ProcessUtils::escapeArgument($gitWrapper->getGitBinary()) . ' ' . $gitCommand->getCommandLine();
     $directory = realpath($gitCommand->getDirectory());
     $envVars = null;
     $wrapperEnvVars = $gitWrapper->getEnvVars();
     if (!empty($wrapperEnvVars)) {
         $envVars = array_merge($_ENV, $_SERVER, $wrapperEnvVars);
     }
     parent::__construct($commandLine, $directory, $envVars, null, $gitCommand->getTimeout());
 }
开发者ID:ichhabrecht,项目名称:git-wrapper,代码行数:15,代码来源:GitProcess.php

示例12: __construct

 /**
  * @param CommandLine        $commandLine
  * @param ProcessEnvironment $processEnvironment
  * @param int|float|null     $timeout
  * @param string|null        $cwd
  */
 public function __construct(CommandLine $commandLine, ProcessEnvironment $processEnvironment, $timeout = null, $cwd = null)
 {
     $this->processEnvironment = $processEnvironment;
     parent::__construct((string) $commandLine, $cwd, $this->processEnvironment->exportToEnvsArray());
     if ($timeout) {
         $this->setTimeout($timeout);
         // compatibility to SF 2.2
         if (method_exists($this, 'setIdleTimeout')) {
             $this->setIdleTimeout($timeout);
         }
     }
 }
开发者ID:liuggio,项目名称:spawn,代码行数:18,代码来源:Process.php

示例13: __construct

 /**
  * Constructor.
  *
  * @param Console     $console The console
  * @param string      $command The command line to run
  * @param string|null $cwd     The working directory or null to use the
  *                             working dir of the current PHP process
  */
 public function __construct(Console $console, $command, $cwd = null)
 {
     $this->console = $console;
     if (is_string($command)) {
         $command = trim($command);
     } elseif (is_array($command)) {
         $command = implode('; ', $command);
     } else {
         throw new \Netresearch\Kite\Exception('Command must be string or array, ' . gettype($command) . ' given.', 1312454906);
     }
     parent::__construct($command, $cwd, null, null, null);
 }
开发者ID:netresearch,项目名称:kite,代码行数:20,代码来源:Process.php

示例14: __construct

 public function __construct($cmd, $cwd = null, $identityfile = null, $passphrase = null, $timeout = 180)
 {
     if (!empty($passphrase)) {
         $command = base_path() . '/scripts/git.sh -i ' . $identityfile . ' ' . $cmd;
         $commandline = $this->expectWithPassphrase($command, $passphrase, $timeout);
     } elseif (!empty($identityfile)) {
         $command = base_path() . '/scripts/git.sh -i ' . $identityfile . ' ' . $cmd;
         $commandline = $this->expect($command, $timeout);
     } else {
         $command = $cmd;
         $commandline = $this->expect($cmd, $timeout);
     }
     parent::__construct($commandline, $cwd);
 }
开发者ID:kangzhenkang,项目名称:eleme-deploy,代码行数:14,代码来源:GitProcess.php

示例15: __construct

 /**
  * Constructor.
  *
  * @param string      $script  The PHP script to run (as a string)
  * @param string|null $cwd     The working directory or null to use the working dir of the current PHP process
  * @param array|null  $env     The environment variables or null to use the same environment as the current PHP process
  * @param int         $timeout The timeout in seconds
  * @param array       $options An array of options for proc_open
  */
 public function __construct($script, $cwd = null, array $env = null, $timeout = 60, array $options = array())
 {
     $executableFinder = new PhpExecutableFinder();
     if (false === ($php = $executableFinder->find())) {
         $php = null;
     }
     if ('phpdbg' === PHP_SAPI) {
         $file = tempnam(sys_get_temp_dir(), 'dbg');
         file_put_contents($file, $script);
         register_shutdown_function('unlink', $file);
         $php .= ' ' . ProcessUtils::escapeArgument($file);
         $script = null;
     }
     parent::__construct($php, $cwd, $env, $script, $timeout, $options);
 }
开发者ID:nix9,项目名称:laracasts,代码行数:24,代码来源:PhpProcess.php


注:本文中的Symfony\Component\Process\Process::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。