X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fshell%2FResult.php;h=1e18210f2ba3a4b5695acb9990e753905192a6ac;hb=bdb5b592f444f4670070808048afcb0bb1adcc5a;hp=c1429dfca2c0856c60c40d67db3ed5d4b90f2593;hpb=17e88d99eb768e4181207bbd35656d239ef5d4e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/shell/Result.php b/includes/shell/Result.php index c1429dfca2..1e18210f2b 100644 --- a/includes/shell/Result.php +++ b/includes/shell/Result.php @@ -32,13 +32,17 @@ class Result { /** @var string */ private $stdout; + /** @var string|null */ + private $stderr; + /** * @param int $exitCode * @param string $stdout */ - public function __construct( $exitCode, $stdout ) { + public function __construct( $exitCode, $stdout, $stderr = null ) { $this->exitCode = $exitCode; $this->stdout = $stdout; + $this->stderr = $stderr; } /** @@ -58,4 +62,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; + } }