/** * @param array $params * * @return mixed */ public static function load($params = []) { $configFile = null; $configPaths = []; extract($params); $me = new static(); $me->loadConfig($configFile, $configPaths); $me->before(); $me->customLoad(); $me->loadDispatcher(); $me->after(); $me->finish(); return $me->getApplication(); }
public function _internal($location, $params = array()) { if (is_string($location)) { $dispatcher = new static(array()); $dispatcher->options = $this->options; $dispatcher->router = $this->router; $dispatcher->params = $params; $application = $dispatcher->getApplication($location); return $application->_run(); } }