public function onBootstrap(MvcEvent $e)
    {
        $serviceManager = $e->getApplication()->getServiceManager();

        // Don't break console routes
        if ($e->getRequest() instanceof Request) {
            return;
        }

        //Add Domain Checker
        $onDispatchListener = $serviceManager->get(
            \RcmAdmin\EventListener\DispatchListener::class
        );

        /** @var \Zend\EventManager\EventManager $eventManager */
        $eventManager = $e->getApplication()->getEventManager();

        $eventManager->attach(
            MvcEvent::EVENT_DISPATCH,
            [
                $onDispatchListener,
                'getAdminPanel'
            ],
            10001
        );
    }
public function onBootstrap(MvcEvent $e)
    {
        $serviceManager = $e->getApplication()->getServiceManager();

        // Don't break console routes
        if ($e->getRequest() instanceof Request) {
            return;
        }

        //Add Domain Checker
        $onDispatchListener = $serviceManager->get(
            \RcmAdmin\EventListener\DispatchListener::class
        );

        /** @var \Zend\EventManager\EventManager $eventManager */
        $eventManager = $e->getApplication()->getEventManager();

        $eventManager->attach(
            MvcEvent::EVENT_DISPATCH,
            [
                $onDispatchListener,
                'getAdminPanel'
            ],
            10001
        );
    }
public function onBootstrap ( MvcEvent $ e ) { $ serviceManager = $ e -> getApplication ( ) -> getServiceManager ( ) ; // Don't break console routes if ( $ e -> getRequest ( ) instanceof Request ) { return ; } //Add Domain Checker $ onDispatchListener = $ serviceManager -> get ( \ RcmAdmin \ EventListener \ DispatchListener :: class ) ; /** @var \Zend\EventManager\EventManager $eventManager */ $ eventManager = $ e -> getApplication ( ) -> getEventManager ( ) ; $ eventManager -> attach ( MvcEvent :: EVENT_DISPATCH , [ $ onDispatchListener , 'getAdminPanel' ] , 10001 ) ; }
Add Listeners to the bootstrap

@param MvcEvent $e Event Manager

@return null
Add Listeners to the bootstrap