private function __construct(array $config, array $providers, array $routes, array $events) { !empty($config['app']) && $this->initAppByConfig($config['app']); Config::init($config); $this->serviceContainer = ServiceContainer::getInstance($providers); $this->router = Router::getInstance($routes); Url::setRouter($this->router); EventManager::init($events); }
private static function getBaseUrl($requestUrl) { return Url::getBaseUrl($requestUrl); }
protected function redirect($url) { ob_end_clean(); header('location:' . Url::gen($url)); exit; }