/** * 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; }
/** * 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; }
/** * @param string $name * @param string $pattern * @param array $defaults */ public function __construct($name, $pattern, array $defaults) { parent::__construct($name, $defaults); $this->pattern = $pattern; }