Zend\Mvc\MvcEvent::setApplication PHP Method

setApplication() public method

Set application instance
public setApplication ( Zend\Mvc\ApplicationInterface $application ) : MvcEvent
$application Zend\Mvc\ApplicationInterface
return MvcEvent
    public function setApplication(ApplicationInterface $application)
    {
        $this->setParam('application', $application);
        $this->application = $application;
        return $this;
    }

Usage Example

 public function bootstrap()
 {
     $event = new MvcEvent();
     $event->setApplication($this);
     $event->setTarget($this);
     $this->getEventManager()->trigger(MvcEvent::EVENT_BOOTSTRAP, $event);
 }
All Usage Examples Of Zend\Mvc\MvcEvent::setApplication