src/Mvc/Controller/Plugin/Back.php
public function storeRoute(MvcEvent $event)
    {
        if ($this->ignore) {
            return;
        }
        
        $request = $event->getRequest();
        if ($request->isXmlHttpRequest()) {
            return;
        }
        
        $appConfig = $event->getApplication()
            ->getServiceManager()
            ->get('config');
        $config = array_key_exists(self::CONFIG_KEY, $appConfig) ? $appConfig[self::CONFIG_KEY] : array();
        if (array_key_exists('blacklist', $config)) {
            $this->setBlacklist($config['blacklist']);
        }
        
        $routeMatch = $event->getRouteMatch();
        if (null === $routeMatch ||
             in_array($routeMatch->getMatchedRouteName(), $this->blacklist)) {
            return;
        }
        
        $this->getSession()->route = $routeMatch;
    }
public function storeRoute(MvcEvent $event)
    {
        if ($this->ignore) {
            return;
        }
        
        $request = $event->getRequest();
        if ($request->isXmlHttpRequest()) {
            return;
        }
        
        $appConfig = $event->getApplication()
            ->getServiceManager()
            ->get('config');
        $config = array_key_exists(self::CONFIG_KEY, $appConfig) ? $appConfig[self::CONFIG_KEY] : array();
        if (array_key_exists('blacklist', $config)) {
            $this->setBlacklist($config['blacklist']);
        }
        
        $routeMatch = $event->getRouteMatch();
        if (null === $routeMatch ||
             in_array($routeMatch->getMatchedRouteName(), $this->blacklist)) {
            return;
        }
        
        $this->getSession()->route = $routeMatch;
    }
public function storeRoute ( MvcEvent $ event ) { if ( $ this -> ignore ) { return ; } $ request = $ event -> getRequest ( ) ; if ( $ request -> isXmlHttpRequest ( ) ) { return ; } $ appConfig = $ event -> getApplication ( ) -> getServiceManager ( ) -> get ( 'config' ) ; $ config = array_key_exists ( self :: CONFIG_KEY , $ appConfig ) ? $ appConfig [ self :: CONFIG_KEY ] : array ( ) ; if ( array_key_exists ( 'blacklist' , $ config ) ) { $ this -> setBlacklist ( $ config [ 'blacklist' ] ) ; } $ routeMatch = $ event -> getRouteMatch ( ) ; if ( null === $ routeMatch || in_array ( $ routeMatch -> getMatchedRouteName ( ) , $ this -> blacklist ) ) { return ; } $ this -> getSession ( ) -> route = $ routeMatch ; }
Store route in session so it can be returned to later.
@param MvcEvent $event
Store route in session so it can be returned to later .