public function addOperationListener(OperationListenerInterface $listener, $priority = 0)
    {
        $this->getEventManager()->attach('beforeOperation', [$listener, 'beforeOperation'], $priority);
        $this->getEventManager()->attach('afterOperation', [$listener, 'afterOperation'], $priority);
        $this->getEventManager()->attach('onOperationException', [$listener, 'onOperationException'], $priority);
    }
public function addOperationListener(OperationListenerInterface $listener, $priority = 0)
    {
        $this->getEventManager()->attach('beforeOperation', [$listener, 'beforeOperation'], $priority);
        $this->getEventManager()->attach('afterOperation', [$listener, 'afterOperation'], $priority);
        $this->getEventManager()->attach('onOperationException', [$listener, 'onOperationException'], $priority);
    }
public function addOperationListener ( OperationListenerInterface $ listener , $ priority = 0 ) { $ this -> getEventManager ( ) -> attach ( 'beforeOperation' , [ $ listener , 'beforeOperation' ] , $ priority ) ; $ this -> getEventManager ( ) -> attach ( 'afterOperation' , [ $ listener , 'afterOperation' ] , $ priority ) ; $ this -> getEventManager ( ) -> attach ( 'onOperationException' , [ $ listener , 'onOperationException' ] , $ priority ) ; }
Attach a listener for operation events.
@param \Gamegos\NoSql\Storage\Event\OperationListenerInterface $listener
@param int $priority
Attach a listener for operation events .