Symfony2 API
Class

Symfony\Component\DependencyInjection\Loader\PhpFileLoader

class PhpFileLoader extends FileLoader

PhpFileLoader loads service definitions from a PHP file.

The PHP file is required and the $container variable can be
used form the file to change the container.

Methods

__construct(ContainerBuilder $container, FileLocatorInterface $locator)

Constructor.

from FileLoader
load(mixed $file, string $type = null)

Loads a PHP file.

Boolean supports(mixed $resource, string $type = null)

Returns true if this class supports the given resource.

Details

in FileLoader at line 33
public __construct(ContainerBuilder $container, FileLocatorInterface $locator)

Constructor.

Parameters

ContainerBuilder $container A ContainerBuilder instance
FileLocatorInterface $locator A FileLocator instance

at line 32
public load(mixed $file, string $type = null)

Loads a PHP file.

Parameters

mixed $file The resource
string $type The resource type

at line 53
public Boolean supports(mixed $resource, string $type = null)

Returns true if this class supports the given resource.

Parameters

mixed $resource A resource
string $type The resource type

Return Value

Boolean true if this class supports the given resource, false otherwise