コード例 #1
0
ファイル: Route.php プロジェクト: gudwin/extasy
 public function __construct($config = array())
 {
     if (empty($config['url'])) {
         $config['url'] = '/';
     }
     parent::__construct($config);
 }
コード例 #2
0
ファイル: LoginRoute.php プロジェクト: gudwin/extasy
 public function test($request)
 {
     if (!CMSAuth::getInstance()->isLogined()) {
         return parent::test($request);
     }
     return false;
 }
コード例 #3
0
ファイル: Route.php プロジェクト: gudwin/extasy
 public function dispatch()
 {
     $granted = \CMSAuth::getInstance()->check();
     if ($granted) {
         parent::dispatch();
     } else {
     }
 }
コード例 #4
0
ファイル: routeTest.php プロジェクト: gudwin/faid
 public function testBuildUrl()
 {
     $route = new HttpRoute(['url' => '/:arg1/:arg2!']);
     $result = $route->buildUrl(['arg1' => 'hello', 'arg2' => 'world']);
     $this->assertEquals($result, '/hello/world!');
 }