X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fshell%2FResult.php;h=a105cd12d31e996e7d0301d661ed6840687b3355;hb=ce071ded5195b30b5ef750e667aa9b5e39dc8b10;hp=c1429dfca2c0856c60c40d67db3ed5d4b90f2593;hpb=971a50c4f3c61fb3a4bec60cd712317bb8ddcb9a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/shell/Result.php b/includes/shell/Result.php index c1429dfca2..a105cd12d3 100644 --- a/includes/shell/Result.php +++ b/includes/shell/Result.php @@ -32,13 +32,18 @@ class Result { /** @var string */ private $stdout; + /** @var string|null */ + private $stderr; + /** * @param int $exitCode * @param string $stdout + * @param string|null $stderr */ - public function __construct( $exitCode, $stdout ) { + public function __construct( $exitCode, $stdout, $stderr = null ) { $this->exitCode = $exitCode; $this->stdout = $stdout; + $this->stderr = $stderr; } /** @@ -58,4 +63,14 @@ class Result { public function getStdout() { return $this->stdout; } + + /** + * Returns stderr of the process or null if the Command was configured to add stderr to stdout + * with includeStderr( true ) + * + * @return string|null + */ + public function getStderr() { + return $this->stderr; + } }