class ClosureLoader extends Loader
ClosureLoader loads service definitions from a PHP closure.
The Closure has access to the container as its first argument.
Methods
| LoaderResolver |
getResolver()
Gets the loader resolver. |
from Loader |
|
setResolver(LoaderResolver $resolver)
Sets the loader resolver. |
from Loader | |
|
import(mixed $resource, string $type = null)
Imports a resource. |
from Loader | |
| LoaderInterface |
resolve(mixed $resource, string $type = null)
Finds a loader able to load an imported resource. |
from Loader |
|
__construct(ContainerBuilder $container)
Constructor. |
||
|
load(Closure $closure, string $type = null)
Loads a resource. |
||
| Boolean |
supports(mixed $resource, string $type = null)
Returns true if this class supports the given resource. |
Details
in Loader at line 30
public LoaderResolver
getResolver()
Gets the loader resolver.
in Loader at line 40
public
setResolver(LoaderResolver $resolver)
Sets the loader resolver.
in Loader at line 51
public
import(mixed $resource, string $type = null)
Imports a resource.
in Loader at line 66
public LoaderInterface
resolve(mixed $resource, string $type = null)
Finds a loader able to load an imported resource.
at line 33
public
__construct(ContainerBuilder $container)
Constructor.
at line 44
public
load(Closure $closure, string $type = null)
Loads a resource.
at line 57
public Boolean
supports(mixed $resource, string $type = null)
Returns true if this class supports the given resource.