public function run($url = null)
    {
        if (is_null($this->route)) {
            throw new Exception("This is an invalid route.");
        }

        // Allow plugins and the code outside the MVC system to cancel
        // a route.
        if (function_exists('apply_filters')) {
            $url = apply_filters('strata_on_before_url_routing', $url);
        }

        $this->route->process($url);

        if ($this->route->isValid()) {
            return $this->route->attemptCompletion();
        }

        $controllerClass = get_class($this->route->controller);
        $messagePattern = "<warning>%s#%s is not a matched Strata route.</warning>";
        $this->log(sprintf($messagePattern, $controllerClass, $this->route->action));
    }
public function run($url = null)
    {
        if (is_null($this->route)) {
            throw new Exception("This is an invalid route.");
        }

        // Allow plugins and the code outside the MVC system to cancel
        // a route.
        if (function_exists('apply_filters')) {
            $url = apply_filters('strata_on_before_url_routing', $url);
        }

        $this->route->process($url);

        if ($this->route->isValid()) {
            return $this->route->attemptCompletion();
        }

        $controllerClass = get_class($this->route->controller);
        $messagePattern = "<warning>%s#%s is not a matched Strata route.</warning>";
        $this->log(sprintf($messagePattern, $controllerClass, $this->route->action));
    }
public function run ( $ url = null ) { if ( is_null ( $ this -> route ) ) { throw new Exception ( "This is an invalid route." ) ; } // Allow plugins and the code outside the MVC system to cancel // a route. if ( function_exists ( 'apply_filters' ) ) { $ url = apply_filters ( 'strata_on_before_url_routing' , $ url ) ; } $ this -> route -> process ( $ url ) ; if ( $ this -> route -> isValid ( ) ) { return $ this -> route -> attemptCompletion ( ) ; } $ controllerClass = get_class ( $ this -> route -> controller ) ; $ messagePattern = "<warning>%s#%s is not a matched Strata route.</warning>" ; $ this -> log ( sprintf ( $ messagePattern , $ controllerClass , $ this -> route -> action ) ) ; }
Attempts to run the currently loaded route object.
@return mixed Returns what the action function will have returned.
@throws  Exception when the route is not instantiated.
@filter strata_on_before_url_routing
Attempts to run the currently loaded route object .