__construct() public method

Group constructor.
public __construct ( boolean $useDefaultRoutes = true )
$useDefaultRoutes boolean
示例#1
0
 public function __construct()
 {
     parent::__construct(true);
     $this->add('/about', 'Index::about');
     $this->addGet('/about1', 'Index::about');
     $this->addGet('/about2', [IndexController::class, 'about']);
     $this->addGet('/about3', ['controller' => IndexController::class, 'action' => 'about']);
 }
示例#2
0
 public function __construct()
 {
     parent::__construct(true);
 }
示例#3
0
 public function __construct()
 {
     parent::__construct(true);
     $this->addGet('/time/current', [TimeController::class, 'current']);
 }