Lines Matching refs:null

136      * @param string|null    $cwd     The working directory or null to use the working dir of the current PHP process
137 * @param array|null $env The environment variables or null to use the same environment as the current PHP process
138 * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input
139 * @param int|float|null $timeout The timeout in seconds or null to disable
143 public function __construct(array $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
156 if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) {
159 if (null !== $env) {
180 * $process->run(null, ['MY_VAR' => $theValue]);
183 * @param string|null $cwd The working directory or null to use the working dir of the current PHP process
184 * @param array|null $env The environment variables or null to use the same environment as the current PHP process
185 * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input
186 * @param int|float|null $timeout The timeout in seconds or null to disable
192 public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
237 * @param callable|null $callback A PHP callback to run whenever there is some
250 public function run(callable $callback = null, array $env = []): int
269 public function mustRun(callable $callback = null, array $env = []): self
290 * @param callable|null $callback A PHP callback to run whenever there is some
297 public function start(callable $callback = null, array $env = [])
306 $this->hasCallback = null !== $callback;
333 $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;';
376 * @param callable|null $callback A PHP callback to run whenever there is some
388 public function restart(callable $callback = null, array $env = []): self
407 * @param callable|null $callback A valid PHP callback
415 public function wait(callable $callback = null)
421 if (null !== $callback) {
496 * @return int|null The process id if running, null otherwise
500 return $this->isRunning() ? $this->processInformation['pid'] : null;
534 if (null !== $this->idleTimeout) {
635 while (null !== $this->callback || ($yieldOut && !feof($this->stdout)) || ($yieldErr && !feof($this->stderr))) {
749 * @return int|null The exit status code, null if the Process is not terminated
764 * @return string|null A string representation for the exit status code, null if the Process is not terminated
771 if (null === $exitcode = $this->getExitCode()) {
772 return null;
915 * @return int|null The exit-code of the process or null if it's not running
917 public function stop(float $timeout = 10, int $signal = null)
995 * @return float|null
1005 * @return float|null
1015 * To disable the timeout, set this value to null.
1031 * To disable the timeout, set this value to null.
1040 if (null !== $timeout && $this->outputDisabled) {
1106 * @return string|null
1110 if (null === $this->cwd) {
1113 return getcwd() ?: null;
1158 * @return resource|string|\Iterator|null
1170 * @param string|int|float|bool|resource|\Traversable|null $input The content
1201 if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) {
1207 if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) {
1259 if (null === $isTtySupported) {
1260 $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes);
1275 if (null !== $result) {
1283 return $result = (bool) @proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes);
1309 * @param callable|null $callback The user defined PHP callback
1313 protected function buildCallback(callable $callback = null)
1317 return null !== $callback && $callback($type, $data);
1330 return null !== $callback && $callback($type, $data);
1366 if (null !== self::$sigchild) {
1409 $timeout = null;
1464 $this->callback = null;
1474 $this->starttime = null;
1475 $this->callback = null;
1476 $this->exitcode = null;
1478 $this->processInformation = null;
1481 $this->process = null;
1482 $this->latestSignal = null;
1500 if (null === $pid = $this->getPid()) {
1617 if ('' === $argument || null === $argument) {