original_string: public function run()
      {
          if (!$this->initialized) {
              $this->initialize();
          }
  
          // Get the current url
          $currentUrl     = $this->toolkit->getCurrentUrl();
          $currentFullUrl = $this->toolkit->getCurrentUrlFull();
  
          // And try to match the route
          $this->hook->trigger(self::HOOK_ROUTE_MATCH_BEFORE, $currentUrl);
          $route = $this->router->matchUrl($currentUrl);
          $this->hook->trigger(self::HOOK_ROUTE_MATCH_AFTER, $route);
  
          if ($route) {
              $this->dispatchRoute($route);
          } else {
              $this->response->setHttpCode(404);
              $this->hook->trigger(self::HOOK_HTTP_404, $currentFullUrl);
          }
  
          $this->loadLayout();
  
          $this->hook->trigger(self::HOOK_RESPONSE_SEND);
          $this->response->send();
          return $this;
      }
code: public function run()
      {
          if (!$this->initialized) {
              $this->initialize();
          }
  
          // Get the current url
          $currentUrl     = $this->toolkit->getCurrentUrl();
          $currentFullUrl = $this->toolkit->getCurrentUrlFull();
  
          // And try to match the route
          $this->hook->trigger(self::HOOK_ROUTE_MATCH_BEFORE, $currentUrl);
          $route = $this->router->matchUrl($currentUrl);
          $this->hook->trigger(self::HOOK_ROUTE_MATCH_AFTER, $route);
  
          if ($route) {
              $this->dispatchRoute($route);
          } else {
              $this->response->setHttpCode(404);
              $this->hook->trigger(self::HOOK_HTTP_404, $currentFullUrl);
          }
  
          $this->loadLayout();
  
          $this->hook->trigger(self::HOOK_RESPONSE_SEND);
          $this->response->send();
          return $this;
      }
code_tokens: public function run ( ) { if ( ! $ this -> initialized ) { $ this -> initialize ( ) ; } // Get the current url $ currentUrl = $ this -> toolkit -> getCurrentUrl ( ) ; $ currentFullUrl = $ this -> toolkit -> getCurrentUrlFull ( ) ; // And try to match the route $ this -> hook -> trigger ( self :: HOOK_ROUTE_MATCH_BEFORE , $ currentUrl ) ; $ route = $ this -> router -> matchUrl ( $ currentUrl ) ; $ this -> hook -> trigger ( self :: HOOK_ROUTE_MATCH_AFTER , $ route ) ; if ( $ route ) { $ this -> dispatchRoute ( $ route ) ; } else { $ this -> response -> setHttpCode ( 404 ) ; $ this -> hook -> trigger ( self :: HOOK_HTTP_404 , $ currentFullUrl ) ; } $ this -> loadLayout ( ) ; $ this -> hook -> trigger ( self :: HOOK_RESPONSE_SEND ) ; $ this -> response -> send ( ) ; return $ this ; }
docstring: Do all the setup and then attempt to match and dispatch the current url.
  
  @return $this
docstring_tokens: Do all the setup and then attempt to match and dispatch the current url .