class LazyRouteCollection extends RouteCollection (View source)

Properties

protected RouteProviderInterface $provider

The route provider for this generator.

Methods

__construct(RouteProviderInterface $provider)

Constructs a LazyRouteCollection.

getIterator()

{@inheritdoc}

int
count()

Gets the number of Routes in this collection.

Route[]
all()

Returns all routes in this collection.

Route|null
get(string $name)

Gets a route by name.

Details

__construct(RouteProviderInterface $provider)

Constructs a LazyRouteCollection.

Parameters

RouteProviderInterface $provider

ArrayIterator getIterator()

{@inheritdoc}

Return Value

ArrayIterator

int count()

Gets the number of Routes in this collection.

Return Value

int

The number of routes

Route[] all()

Returns all routes in this collection.

Return Value

Route[]

An array of routes

Route|null get(string $name)

Gets a route by name.

Parameters

string $name

The route name

Return Value

Route|null

A Route instance or null when not found