public function setOutput($output)
    {
        $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper;

        if (\is_callable($output)) {
            $this->outputStream = null;
            $this->lineDumper = $output;
        } else {
            if (\is_string($output)) {
                $output = fopen($output, 'wb');
            }
            $this->outputStream = $output;
            $this->lineDumper = [$this, 'echoLine'];
        }

        return $prev;
    }
public function setOutput($output)
    {
        $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper;

        if (\is_callable($output)) {
            $this->outputStream = null;
            $this->lineDumper = $output;
        } else {
            if (\is_string($output)) {
                $output = fopen($output, 'wb');
            }
            $this->outputStream = $output;
            $this->lineDumper = [$this, 'echoLine'];
        }

        return $prev;
    }
public function setOutput ( $ output ) { $ prev = null !== $ this -> outputStream ? $ this -> outputStream : $ this -> lineDumper ; if ( \ is_callable ( $ output ) ) { $ this -> outputStream = null ; $ this -> lineDumper = $ output ; } else { if ( \ is_string ( $ output ) ) { $ output = fopen ( $ output , 'wb' ) ; } $ this -> outputStream = $ output ; $ this -> lineDumper = [ $ this , 'echoLine' ] ; } return $ prev ; }
Sets the output destination of the dumps.

@param callable|resource|string $output A line dumper callable, an opened stream or an output path

@return callable|resource|string The previous output destination
Sets the output destination of the dumps .