public function attachPersistor(PersistorInterface $persistor, $key = '')
    {
        if (empty($key)) {
            $this->persistors[] = $persistor;
        } else {
            $this->persistors[$key] = $persistor;
        }
    }
public function attachPersistor(PersistorInterface $persistor, $key = '')
    {
        if (empty($key)) {
            $this->persistors[] = $persistor;
        } else {
            $this->persistors[$key] = $persistor;
        }
    }
public function attachPersistor ( PersistorInterface $ persistor , $ key = '' ) { if ( empty ( $ key ) ) { $ this -> persistors [ ] = $ persistor ; } else { $ this -> persistors [ $ key ] = $ persistor ; } }
Adds the given persistor to the collection of output handlers

@param PersistorInterface $persistor
@param string $key
Adds the given persistor to the collection of output handlers