You are here

public function ClosureLoader::supports in Zircon Profile 8

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

File

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

Class

ClosureLoader
ClosureLoader loads routes from a PHP closure.

Namespace

Symfony\Component\Routing\Loader

Code

public function supports($resource, $type = null) {
  return $resource instanceof \Closure && (!$type || 'closure' === $type);
}