RouteCollection::setMethods()

setMethods(string|array $methods) Sets the HTTP methods (e.g. 'POST') all child routes are restricted to. Parameters string|array $methods The method or an array of methods

RouteCollection::remove()

remove(string|array $name) Removes a route or an array of routes by name from the collection. Parameters string|array $name The route name or an array of route names

RouteCollection::all()

Route[] all() Returns all routes in this collection. Return Value Route[] An array of routes

RouteCollection::getResources()

ResourceInterface[] getResources() Returns an array of resources loaded to build this collection. Return Value ResourceInterface[] An array of resources

RouteCollection::addResource()

addResource(ResourceInterface $resource) Adds a resource for this collection. Parameters ResourceInterface $resource A resource instance

RouteCollection::count()

int count() Gets the number of Routes in this collection. Return Value int The number of routes

RouteCollection::getIterator()

ArrayIterator|Route[] getIterator() Gets the current RouteCollection as an Iterator that includes all routes. It implements \IteratorAggregate. Return Value ArrayIterator|Route[] An \ArrayIterator object for iterating over routes See also all()

RouteCollection::add()

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

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::addPrefix()

addPrefix(string $prefix, array $defaults = array(), array $requirements = array()) Adds a prefix to the path of all child routes. Parameters string $prefix An optional prefix to add before each pattern of the route collection array $defaults An array of default values array $requirements An array of requirements