Skip to content

Commit

Permalink
Merge branch '2.0' into 2.1
Browse files Browse the repository at this point in the history
* 2.0:
  fixed CS
  added doc comments
  [HttpKernel][Translator] Fixed type-hints
  [Translation] forced the catalogue to be regenerated when a resource is added (closes symfony/translation#1)
  [HttpFoundation] Fixed #5611 - Request::splitHttpAcceptHeader incorrect result order.

Conflicts:
	src/Symfony/Component/Process/Process.php
	tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php
  • Loading branch information
fabpot committed Oct 6, 2012
2 parents 2965a03 + 534f839 commit a67692d
Showing 1 changed file with 67 additions and 2 deletions.
69 changes: 67 additions & 2 deletions Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ public function hasBeenStopped()
}

/**
* Returns the number of the signal that caused the child process to stop its execution
* Returns the number of the signal that caused the child process to stop its execution.
*
* It is only meaningful if hasBeenStopped() returns true.
*
Expand Down Expand Up @@ -610,26 +610,51 @@ public function stop($timeout=10)
return $this->exitcode;
}

/**
* Adds a line to the STDOUT stream.
*
* @param string $line The line to append
*/
public function addOutput($line)
{
$this->stdout .= $line;
}

/**
* Adds a line to the STDERR stream.
*
* @param string $line The line to append
*/
public function addErrorOutput($line)
{
$this->stderr .= $line;
}

/**
* Gets the command line to be executed.
*
* @return string The command to execute
*/
public function getCommandLine()
{
return $this->commandline;
}

/**
* Sets the command line to be executed.
*
* @param string $commandline The command to execute
*/
public function setCommandLine($commandline)
{
$this->commandline = $commandline;
}

/**
* Gets the process timeout.
*
* @return integer The timeout in seconds
*/
public function getTimeout()
{
return $this->timeout;
Expand All @@ -640,7 +665,7 @@ public function getTimeout()
*
* To disable the timeout, set this value to null.
*
* @param integer|null
* @param integer|null $timeout The timeout in seconds
*/
public function setTimeout($timeout)
{
Expand All @@ -659,41 +684,81 @@ public function setTimeout($timeout)
$this->timeout = $timeout;
}

/**
* Gets the working directory.
*
* @return string The current working directory
*/
public function getWorkingDirectory()
{
return $this->cwd;
}

/**
* Sets the current working directory.
*
* @param string $cwd The new working directory
*/
public function setWorkingDirectory($cwd)
{
$this->cwd = $cwd;
}

/**
* Gets the environment variables.
*
* @return array The current environment variables
*/
public function getEnv()
{
return $this->env;
}

/**
* Sets the environment variables.
*
* @param array $env The new environment variables
*/
public function setEnv(array $env)
{
$this->env = $env;
}

/**
* Gets the contents of STDIN.
*
* @return string The current contents
*/
public function getStdin()
{
return $this->stdin;
}

/**
* Sets the contents of STDIN.
*
* @param string $stdin The new contents
*/
public function setStdin($stdin)
{
$this->stdin = $stdin;
}

/**
* Gets the options for proc_open.
*
* @return array The current options
*/
public function getOptions()
{
return $this->options;
}

/**
* Sets the options for proc_open.
*
* @param array $options The new options
*/
public function setOptions(array $options)
{
$this->options = $options;
Expand Down

0 comments on commit a67692d

Please sign in to comment.