You are here

public function ClosureLoader::load in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/routing/Loader/ClosureLoader.php \Symfony\Component\Routing\Loader\ClosureLoader::load()
  2. 8 vendor/symfony/dependency-injection/Loader/ClosureLoader.php \Symfony\Component\DependencyInjection\Loader\ClosureLoader::load()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Loader/ClosureLoader.php \Symfony\Component\Routing\Loader\ClosureLoader::load()

Loads a Closure.

Parameters

\Closure $closure A Closure:

string|null $type The resource type:

Return value

RouteCollection A RouteCollection instance

File

vendor/symfony/routing/Loader/ClosureLoader.php, line 34

Class

ClosureLoader
ClosureLoader loads routes from a PHP closure.

Namespace

Symfony\Component\Routing\Loader

Code

public function load($closure, $type = null) {
  return $closure();
}