Documentation

ContainerLoader extends ObjectLoader
in package

A route loader that executes a service from a PSR-11 container to load the routes.

Tags
author

Ryan Weaver ryan@knpuniversity.com

Table of Contents

$env  : mixed
$resolver  : mixed
$container  : mixed
__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.
supports()  : mixed
{@inheritdoc}
getObject()  : object
Returns the object that the method will be called on to load routes.
addClassResource()  : mixed

Properties

$resolver

protected mixed $resolver

Methods

import()

Imports a resource.

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

A resource

$type : string|null = null

The resource type or null if unknown

Return values
mixed

load()

Calls the object method that will load the routes.

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

object_id::method

$type : string|null = null

The resource type

Return values
RouteCollection

resolve()

Finds a loader able to load an imported resource.

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

A resource

$type : string|null = null

The resource type or null if unknown

Tags
throws
LoaderLoadException

If no loader is found

Return values
LoaderInterface

supports()

{@inheritdoc}

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

getObject()

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

protected getObject(string $id) : object
Parameters
$id : string
Return values
object

Search results