示例#1
0
文件: App.php 项目: Orlion/Minor
 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);
 }
示例#2
0
 private static function getBaseUrl($requestUrl)
 {
     return Url::getBaseUrl($requestUrl);
 }
示例#3
0
 protected function redirect($url)
 {
     ob_end_clean();
     header('location:' . Url::gen($url));
     exit;
 }