예제 #1
0
 /**
  * Sets the input.
  *
  * This content will be passed to the underlying process standard input.
  *
  * @param mixed $input The content
  *
  * @return self The current Process instance
  *
  * @throws LogicException In case the process is running
  */
 public function setInput($input)
 {
     if ($this->isRunning()) {
         throw new Symfony_Process_Exception_LogicException('Input can not be set while the process is running.');
     }
     $this->input = Symfony_Process_ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);
     return $this;
 }
예제 #2
0
 /**
  * Sets the input of the process.
  *
  * @param mixed $input The input as a string
  *
  * @return Symfony_Process_ProcessBuilder
  *
  * @throws InvalidArgumentException In case the argument is invalid
  */
 public function setInput($input)
 {
     $this->input = Symfony_Process_ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);
     return $this;
 }