/**
  * Dispatch the controller
  *
  * @param Steelcode_Application_Config $config
  * @throws Steelcode_Application_Exception
  */
 public function dispatch(Steelcode_Application_Config $config)
 {
     $className = $config->getControllerClass();
     $this->_controller = new $className($config);
     if (!$this->_checkInstance()) {
         throw new Steelcode_Application_Exception($className . ' does not extend Steelcode Domain Controller');
     }
     $this->_controller->runAction();
 }
 public function extract()
 {
     $requestPath = Steelcode_Server_Vars::getVar('PATH_INFO');
     if ($requestPath === null) {
         $requestPath = $this->_generatePath();
     }
     if ($requestPath === '/') {
         $this->_defaults();
     } else {
         $this->_extractPath($requestPath);
     }
     if (!Steelcode_File_Helper::exists($this->_config->getControllerPath())) {
         $this->_pageNotFound();
     }
     return $this->_config;
 }
 /**
  * Returns controller path
  *
  * @return string
  */
 public function getControllerPath()
 {
     return $this->_config->getControllerPath();
 }