Final Class Yiisoft\Router\RouteCollection
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Public Methods
Method Details
| public mixed __construct ( Yiisoft\ | ||
| $collector | Yiisoft\ |
|
public function __construct(private readonly RouteCollectorInterface $collector) {}
| public Yiisoft\ | ||
| $name | string | |
public function getRoute(string $name): Route
{
$this->ensureItemsInjected();
if (!array_key_exists($name, $this->routes)) {
throw new RouteNotFoundException($name);
}
return $this->routes[$name];
}
| public array getRouteTree ( boolean $routeAsString = true ) | ||
| $routeAsString | boolean | |
public function getRouteTree(bool $routeAsString = true): array
{
$this->ensureItemsInjected();
return $this->buildTree($this->items, $routeAsString);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.