コード例 #1
0
ファイル: ControllersRoute.php プロジェクト: vvval/spiral
 /**
  * New instance of DirectRoute.
  *
  * @param string $name
  * @param string $pattern
  * @param string $namespace   Default controllers namespace.
  * @param string $postfix     Default controller postfix.
  * @param array  $defaults    Default values (including default controller).
  * @param array  $controllers Controllers aliased by their name, namespace and postfix will be
  *                            ignored in this case.
  */
 public function __construct($name, $pattern, $namespace, $postfix = 'Controller', array $defaults = [], array $controllers = [])
 {
     parent::__construct($name, $defaults);
     $this->pattern = $pattern;
     $this->namespace = $namespace;
     $this->postfix = $postfix;
     $this->controllers = $controllers;
 }
コード例 #2
0
ファイル: Route.php プロジェクト: vvval/spiral
 /**
  * New Route instance.
  *
  * @param string          $name
  * @param string          $pattern
  * @param string|callable $target Route target. Can be in a form of controler:action
  * @param array           $defaults
  */
 public function __construct($name, $pattern, $target, array $defaults = [])
 {
     parent::__construct($name, $defaults);
     $this->pattern = $pattern;
     $this->target = $target;
 }
コード例 #3
0
ファイル: VaultRoute.php プロジェクト: spiral-modules/vault
 /**
  * @param string $name
  * @param string $pattern
  * @param array  $defaults
  */
 public function __construct($name, $pattern, array $defaults)
 {
     parent::__construct($name, $defaults);
     $this->pattern = $pattern;
 }