updated-packages
This commit is contained in:
@@ -26,7 +26,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function defaults(array $defaults)
|
||||
final public function defaults(array $defaults): self
|
||||
{
|
||||
$this->route->addDefaults($defaults);
|
||||
|
||||
@@ -38,7 +38,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function requirements(array $requirements)
|
||||
final public function requirements(array $requirements): self
|
||||
{
|
||||
$this->route->addRequirements($requirements);
|
||||
|
||||
@@ -50,19 +50,31 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function options(array $options)
|
||||
final public function options(array $options): self
|
||||
{
|
||||
$this->route->addOptions($options);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether paths should accept utf8 encoding.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function utf8(bool $utf8 = true): self
|
||||
{
|
||||
$this->route->addOptions(['utf8' => $utf8]);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the condition.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function condition(string $condition)
|
||||
final public function condition(string $condition): self
|
||||
{
|
||||
$this->route->setCondition($condition);
|
||||
|
||||
@@ -74,7 +86,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function host(string $pattern)
|
||||
final public function host(string $pattern): self
|
||||
{
|
||||
$this->route->setHost($pattern);
|
||||
|
||||
@@ -89,7 +101,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function schemes(array $schemes)
|
||||
final public function schemes(array $schemes): self
|
||||
{
|
||||
$this->route->setSchemes($schemes);
|
||||
|
||||
@@ -104,7 +116,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function methods(array $methods)
|
||||
final public function methods(array $methods): self
|
||||
{
|
||||
$this->route->setMethods($methods);
|
||||
|
||||
@@ -114,13 +126,37 @@ trait RouteTrait
|
||||
/**
|
||||
* Adds the "_controller" entry to defaults.
|
||||
*
|
||||
* @param callable|string $controller a callable or parseable pseudo-callable
|
||||
* @param callable|string|array $controller a callable or parseable pseudo-callable
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function controller($controller)
|
||||
final public function controller($controller): self
|
||||
{
|
||||
$this->route->addDefaults(array('_controller' => $controller));
|
||||
$this->route->addDefaults(['_controller' => $controller]);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the "_locale" entry to defaults.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function locale(string $locale): self
|
||||
{
|
||||
$this->route->addDefaults(['_locale' => $locale]);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the "_format" entry to defaults.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function format(string $format): self
|
||||
{
|
||||
$this->route->addDefaults(['_format' => $format]);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user