ClosureLoader.php in Service Container 7.2
File
modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php
View source
<?php
namespace Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\Loader\Loader;
class ClosureLoader extends Loader {
private $container;
public function __construct(ContainerBuilder $container) {
$this->container = $container;
}
public function load($resource, $type = null) {
call_user_func($resource, $this->container);
}
public function supports($resource, $type = null) {
return $resource instanceof \Closure;
}
}
Classes
Name |
Description |
ClosureLoader |
ClosureLoader loads service definitions from a PHP closure. |