You are here

public function Process::setInput in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/Process.php \Symfony\Component\Process\Process::setInput()

Sets the input.

This content will be passed to the underlying process standard input.

Parameters

mixed $input The content:

Return value

self The current Process instance

Throws

LogicException In case the process is running

Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0.

1 call to Process::setInput()
Process::setStdin in vendor/symfony/process/Process.php
Sets the contents of STDIN.

File

vendor/symfony/process/Process.php, line 1098

Class

Process
Process is a thin wrapper around proc_* functions to easily start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function setInput($input) {
  if ($this
    ->isRunning()) {
    throw new LogicException('Input can not be set while the process is running.');
  }
  $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);
  return $this;
}