implements |
IteratorAggregate<string, Route>, Countable |
---|
A RouteCollection represents a set of Route instances.
When adding a route at the end of the collection, an existing route with the same name is removed first. So there can only be one route with a given name.
Methods | ||
---|---|---|
public
|
__clone()
|
# |
public
|
getIterator(): ArrayIterator<string, Route>
|
# |
public
|
count(): int
|
# |
public
|
add(string $name, Route $route, int $priority = 0): void
|
# |
public
|
all(): array<string, Route>
|
# |
public
|
get(string $name): ?Route
|
# |
public
|
remove(string|string[] $name): void
|
# |
public
|
addCollection(self $collection): void
|
# |
public
|
addPrefix(string $prefix, array $defaults = [], array $requirements = []): void
|
# |
public
|
addNamePrefix(string $prefix): void
|
# |
public
|
setHost(?string $pattern, array $defaults = [], array $requirements = []): void
|
# |
public
|
setCondition(?string $condition): void
|
# |
public
|
addDefaults(array $defaults): void
|
# |
public
|
addRequirements(array $requirements): void
|
# |
public
|
addOptions(array $options): void
|
# |
public
|
setSchemes(string|string[] $schemes): void
|
# |
public
|
setMethods(string|string[] $methods): void
|
# |
public
|
getResources(): ResourceInterface[]
|
# |
public
|
addResource(ResourceInterface $resource): void
|
# |
public
|
addAlias(string $name, string $alias): Alias
|
# |
public
|
getAliases(): array<string, Alias>
|
# |
public
|
getAlias(string $name): ?Alias
|
# |
public
|
getPriority(string $name): ?int
|
# |