upgraded dependencies
This commit is contained in:
@@ -24,13 +24,15 @@ class RoutingConfigurator
|
||||
private $loader;
|
||||
private $path;
|
||||
private $file;
|
||||
private $env;
|
||||
|
||||
public function __construct(RouteCollection $collection, PhpFileLoader $loader, string $path, string $file)
|
||||
public function __construct(RouteCollection $collection, PhpFileLoader $loader, string $path, string $file, string $env = null)
|
||||
{
|
||||
$this->collection = $collection;
|
||||
$this->loader = $loader;
|
||||
$this->path = $path;
|
||||
$this->file = $file;
|
||||
$this->env = $env;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,4 +59,23 @@ class RoutingConfigurator
|
||||
{
|
||||
return new CollectionConfigurator($this->collection, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current environment to be able to write conditional configuration.
|
||||
*/
|
||||
final public function env(): ?string
|
||||
{
|
||||
return $this->env;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
final public function withPath(string $path): self
|
||||
{
|
||||
$clone = clone $this;
|
||||
$clone->path = $clone->file = $path;
|
||||
|
||||
return $clone;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user