Skip to content

Commit

Permalink
Merge branch '2.1'
Browse files Browse the repository at this point in the history
* 2.1:
  fixed CS
  added doc comments
  added doc comments
  [Validator] Updated swedish translation
  Update src/Symfony/Component/Validator/Resources/translations/validators.de.xlf
  [2.1] Exclude tests from zips via gitattributes
  [HttpKernel][Translator] Fixed type-hints
  Updated lithuanian validation translation
  [DomCrawler] Allows using multiselect through Form::setValues().
  [Translation] forced the catalogue to be regenerated when a resource is added (closes symfony/translation#1)
  Unit test for patched method OptionsResolver::validateOptionValues().
  validateOptionValues throw a notice if an allowed value is set and the corresponding option isn't.
  [Form] Hardened code of ViolationMapper against errors
  [HttpFoundation] Fixed #5611 - Request::splitHttpAcceptHeader incorrect result order.
  [Form] Fixed negative index access in PropertyPathBuilder
  Update src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf

Conflicts:
	src/Symfony/Component/DomCrawler/Form.php
	src/Symfony/Component/Process/Process.php
  • Loading branch information
fabpot committed Oct 6, 2012
2 parents 49871ad + fc5b082 commit f029d06
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Tests/ export-ignore
phpunit.xml.dist export-ignore
77 changes: 75 additions & 2 deletions Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,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 @@ -652,22 +652,41 @@ 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
*
* @return self The current Process instance
*/
public function setCommandLine($commandline)
Expand All @@ -677,6 +696,11 @@ public function setCommandLine($commandline)
return $this;
}

/**
* Gets the process timeout.
*
* @return integer|null The timeout in seconds or null if it's disabled
*/
public function getTimeout()
{
return $this->timeout;
Expand All @@ -687,9 +711,11 @@ public function getTimeout()
*
* To disable the timeout, set this value to null.
*
* @param integer|null
* @param integer|null $timeout The timeout in seconds
*
* @return self The current Process instance
*
* @throws \InvalidArgumentException if the timeout is negative
*/
public function setTimeout($timeout)
{
Expand All @@ -710,12 +736,21 @@ public function setTimeout($timeout)
return $this;
}

/**
* 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
*
* @return self The current Process instance
*/
public function setWorkingDirectory($cwd)
Expand All @@ -725,12 +760,21 @@ public function setWorkingDirectory($cwd)
return $this;
}

/**
* 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
*
* @return self The current Process instance
*/
public function setEnv(array $env)
Expand All @@ -740,12 +784,21 @@ public function setEnv(array $env)
return $this;
}

/**
* 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
*
* @return self The current Process instance
*/
public function setStdin($stdin)
Expand All @@ -755,12 +808,21 @@ public function setStdin($stdin)
return $this;
}

/**
* 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
*
* @return self The current Process instance
*/
public function setOptions(array $options)
Expand All @@ -770,12 +832,23 @@ public function setOptions(array $options)
return $this;
}

/**
* Gets whether or not Windows compatibility is enabled
*
* This is true by default.
*
* @return Boolean
*/
public function getEnhanceWindowsCompatibility()
{
return $this->enhanceWindowsCompatibility;
}

/**
* Sets whether or not Windows compatibility is enabled
*
* @param Boolean $enhance
*
* @return self The current Process instance
*/
public function setEnhanceWindowsCompatibility($enhance)
Expand Down

0 comments on commit f029d06

Please sign in to comment.