public function attach(Listener $listener)
    {
        /** @var \Phalcon\Application $this */
        $listener->setDI($this->getDI());

        $listener->setEventsManager($this->getEventsManager());

        $listener->attach();
    }
public function attach(Listener $listener)
    {
        /** @var \Phalcon\Application $this */
        $listener->setDI($this->getDI());

        $listener->setEventsManager($this->getEventsManager());

        $listener->attach();
    }
public function attach ( Listener $ listener ) { /** @var \Phalcon\Application $this */ $ listener -> setDI ( $ this -> getDI ( ) ) ; $ listener -> setEventsManager ( $ this -> getEventsManager ( ) ) ; $ listener -> attach ( ) ; }
Attach an Listener

@param Listener $listener

@throws \Exception
Attach an Listener