public function registerEvent($event, $callback)
    {
        $eventManager = $this->getServiceLocator()->get(EventManager::CONFIG_ID);
        $eventManager->attach($event, $callback);
        $this->getServiceManager()->register(EventManager::CONFIG_ID, $eventManager);
    }
public function registerEvent($event, $callback)
    {
        $eventManager = $this->getServiceLocator()->get(EventManager::CONFIG_ID);
        $eventManager->attach($event, $callback);
        $this->getServiceManager()->register(EventManager::CONFIG_ID, $eventManager);
    }
public function registerEvent ( $ event , $ callback ) { $ eventManager = $ this -> getServiceLocator ( ) -> get ( EventManager :: CONFIG_ID ) ; $ eventManager -> attach ( $ event , $ callback ) ; $ this -> getServiceManager ( ) -> register ( EventManager :: CONFIG_ID , $ eventManager ) ; }
Add a new event Listener

@param mixed $event either an Event object or a string
@param Callable $callback
Add a new event Listener