RouteCollection::add()

add(string $name, Route $route) Adds a route. Parameters string $name The route name Route $route A Route instance

RouteCollection::addOptions()

addOptions(array $options) Adds options to all routes. An existing option value under the same name in a route will be overridden. Parameters array $options An array of options

RouteCollection::addCollection()

addCollection(RouteCollection $collection) Adds a route collection at the end of the current set by appending all routes of the added collection. Parameters RouteCollection $collection A RouteCollection instance

RouteCollection

class RouteCollection implements IteratorAggregate, 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 __clone() ArrayIterator|Route[] getIterator() Gets the current RouteCollection as an Iterator that includes all routes. int count() Gets the number of Routes in this collection. add(string $name,

Route::setRequirements()

Route setRequirements(array $requirements) Sets the requirements. This method implements a fluent interface. Parameters array $requirements The requirements Return Value Route The current Route instance

Route::setRequirements()

setRequirements($requirements) Parameters $requirements

Route::setRequirement()

Route setRequirement(string $key, string $regex) Sets a requirement for the given key. Parameters string $key The key string $regex The regex Return Value Route The current Route instance

Route::setSchemes()

Route setSchemes(string|array $schemes) Sets the schemes (e.g. 'https') this route is restricted to. So an empty array means that any scheme is allowed. This method implements a fluent interface. Parameters string|array $schemes The scheme or an array of schemes Return Value Route The current Route instance

Route::unserialize()

unserialize($serialized) {@inheritdoc} Parameters $serialized

Route::setSchemes()

setSchemes($schemes) Parameters $schemes