lib/Elastica/Pipeline.php
public function addProcessor(AbstractProcessor $processor)
    {
        if (empty($this->_processors)) {
            $this->_processors['processors'] = $processor->toArray();
            $this->_params['processors'] = [];
        } else {
            $this->_processors['processors'] = \array_merge($this->_processors['processors'], $processor->toArray());
        }

        return $this;
    }
public function addProcessor(AbstractProcessor $processor)
    {
        if (empty($this->_processors)) {
            $this->_processors['processors'] = $processor->toArray();
            $this->_params['processors'] = [];
        } else {
            $this->_processors['processors'] = \array_merge($this->_processors['processors'], $processor->toArray());
        }

        return $this;
    }
public function addProcessor ( AbstractProcessor $ processor ) { if ( empty ( $ this -> _processors ) ) { $ this -> _processors [ 'processors' ] = $ processor -> toArray ( ) ; $ this -> _params [ 'processors' ] = [ ] ; } else { $ this -> _processors [ 'processors' ] = \ array_merge ( $ this -> _processors [ 'processors' ] , $ processor -> toArray ( ) ) ; } return $ this ; }
Add a processor.

@param AbstractProcessor $processor

@return $this
Add a processor .