Documentation

ObjectRouteLoader extends Loader
in package

A route loader that calls a method on an object to load the routes.

Tags
author

Ryan Weaver ryan@knpuniversity.com

Table of Contents

load()  : RouteCollection
Calls the service that will load the routes.
supports()  : mixed
{@inheritdoc}
getServiceObject()  : object
Returns the object that the method will be called on to load routes.
addClassResource()  : mixed

Methods

load()

Calls the service that will load the routes.

public load(mixed $resource[, string|null $type = null ]) : RouteCollection
Parameters
$resource : mixed

Some value that will resolve to a callable

$type : string|null = null

The resource type

Return values
RouteCollection

supports()

{@inheritdoc}

public supports(mixed $resource[, mixed $type = null ]) : mixed
Parameters
$resource : mixed
$type : mixed = null
Return values
mixed

getServiceObject()

Returns the object that the method will be called on to load routes.

protected abstract getServiceObject(string $id) : object

For example, if your application uses a service container, the $id may be a service id.

Parameters
$id : string
Return values
object

Search results