Documentation

ClosureLoader extends Loader
in package

ClosureLoader loads routes from a PHP closure.

The Closure must return a RouteCollection instance.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

load()  : RouteCollection
Loads a Closure.
supports()  : mixed
{@inheritdoc}

Methods

load()

Loads a Closure.

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

A Closure

$type : string|null = null

The resource type

Return values
RouteCollection

A RouteCollection instance

supports()

{@inheritdoc}

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

Search results