Documentation

ObjectLoader extends Loader
in package

AbstractYes

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

Tags
author

Ryan Weaver ryan@knpuniversity.com

Table of Contents

Properties

$env  : mixed
$resolver  : mixed

Methods

__construct()  : mixed
getResolver()  : LoaderResolverInterface
Gets the loader resolver.
import()  : mixed
Imports a resource.
load()  : RouteCollection
Calls the object method that will load the routes.
resolve()  : LoaderInterface
Finds a loader able to load an imported resource.
setResolver()  : mixed
Sets the loader resolver.
getObject()  : object
Returns the object that the method will be called on to load routes.
addClassResource()  : mixed

Properties

$resolver

protected mixed $resolver

Methods

__construct()

public __construct([string $env = null ]) : mixed
Parameters
$env : string = null

import()

Imports a resource.

public import(mixed $resource[, string $type = null ]) : mixed
Parameters
$resource : mixed
$type : string = null

load()

Calls the object method that will load the routes.

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

getObject()

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

protected abstract getObject(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

        
On this page

Search results