/** * Constructor * * @param string $template Template string with parameter placeholders * @param array|string $defaults Defaults for the route. * @param array $options Array of additional options for the Route */ public function __construct($template, $defaults = [], array $options = []) { parent::__construct($template, $defaults, $options); if (is_array($defaults) && isset($defaults['redirect'])) { $defaults = $defaults['redirect']; } $this->redirect = (array) $defaults; }
/** * Constructor * * @param string $template Template string with parameter placeholders * @param array|string $defaults Defaults for the route. * @param array $options Array of additional options for the Route */ public function __construct($template, $defaults = [], array $options = []) { parent::__construct($template, $defaults, $options); $this->redirect = (array) $defaults; }