public function readAll($res = 'out')
    {
        $str = '';
        $this->debugStatus();
        $this->debug('reading all output');
        //stream_set_blocking($this->pipes[$res],0);
        $str = stream_get_contents($this->pipes[$res]);
        $this->close($res);
        if (substr($str, -1) != "\n") {
            $str .= "\n";
        }

        return $str;
    }
public function readAll($res = 'out')
    {
        $str = '';
        $this->debugStatus();
        $this->debug('reading all output');
        //stream_set_blocking($this->pipes[$res],0);
        $str = stream_get_contents($this->pipes[$res]);
        $this->close($res);
        if (substr($str, -1) != "\n") {
            $str .= "\n";
        }

        return $str;
    }
public function readAll ( $ res = 'out' ) { $ str = '' ; $ this -> debugStatus ( ) ; $ this -> debug ( 'reading all output' ) ; //stream_set_blocking($this->pipes[$res],0); $ str = stream_get_contents ( $ this -> pipes [ $ res ] ) ; $ this -> close ( $ res ) ; if ( substr ( $ str , - 1 ) != "\n" ) { $ str .= "\n" ; } return $ str ; }
Reads all output and returns. Closes stdout when EOF reached.

@param string $res optional descriptor (out or err)

@return self
Reads all output and returns . Closes stdout when EOF reached .