private function readStreams(\Closure $callback = null): void
    {
        $stdOut = $this->readOutput(self::STDOUT);
        $stdErr = $this->readOutput(self::STDERR);

        $this->fullStdOut .= $stdOut;
        $this->fullStdErr .= $stdErr;

        if (!is_null($callback)) {
            $callback($stdOut, $stdErr);
        }

        $this->observer->stdOutRead($this->pid, $stdOut);
        $this->observer->stdErrRead($this->pid, $stdErr);
    }
private function readStreams(\Closure $callback = null): void
    {
        $stdOut = $this->readOutput(self::STDOUT);
        $stdErr = $this->readOutput(self::STDERR);

        $this->fullStdOut .= $stdOut;
        $this->fullStdErr .= $stdErr;

        if (!is_null($callback)) {
            $callback($stdOut, $stdErr);
        }

        $this->observer->stdOutRead($this->pid, $stdOut);
        $this->observer->stdErrRead($this->pid, $stdErr);
    }
private function readStreams ( \ Closure $ callback = null ) : void { $ stdOut = $ this -> readOutput ( self :: STDOUT ) ; $ stdErr = $ this -> readOutput ( self :: STDERR ) ; $ this -> fullStdOut .= $ stdOut ; $ this -> fullStdErr .= $ stdErr ; if ( ! is_null ( $ callback ) ) { $ callback ( $ stdOut , $ stdErr ) ; } $ this -> observer -> stdOutRead ( $ this -> pid , $ stdOut ) ; $ this -> observer -> stdErrRead ( $ this -> pid , $ stdErr ) ; }
Read from the stdout & stderr streams, passing data to callback if provided.
Read from the stdout & stderr streams passing data to callback if provided .