public function addStreamFilter(string $filtername, $params = null): self
    {
        if (!$this->document instanceof Stream) {
            throw new Exception('The stream filter API can not be used');
        }

        $this->document->appendFilter($filtername, $this->stream_filter_mode, $params);
        $this->stream_filters[$filtername] = true;
        $this->resetProperties();
        $this->input_bom = null;

        return $this;
    }
public function addStreamFilter(string $filtername, $params = null): self
    {
        if (!$this->document instanceof Stream) {
            throw new Exception('The stream filter API can not be used');
        }

        $this->document->appendFilter($filtername, $this->stream_filter_mode, $params);
        $this->stream_filters[$filtername] = true;
        $this->resetProperties();
        $this->input_bom = null;

        return $this;
    }
public function addStreamFilter ( string $ filtername , $ params = null ) : self { if ( ! $ this -> document instanceof Stream ) { throw new Exception ( 'The stream filter API can not be used' ) ; } $ this -> document -> appendFilter ( $ filtername , $ this -> stream_filter_mode , $ params ) ; $ this -> stream_filters [ $ filtername ] = true ; $ this -> resetProperties ( ) ; $ this -> input_bom = null ; return $ this ; }
append a stream filter.

@param null|mixed $params

@throws Exception If the stream filter API can not be used

@return static
append a stream filter .