Class

Symfony\Component\DependencyInjection\Loader\IniFileLoader

class IniFileLoader extends FileLoader

IniFileLoader loads parameters from INI files.

Methods

LoaderResolverInterface getResolver()

Gets the loader resolver.

from Loader
setResolver(LoaderResolverInterface $resolver)

Sets the loader resolver.

from Loader
mixed import(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null)

Imports a resource.

from FileLoader
LoaderInterface resolve(mixed $resource, string $type = null)

Finds a loader able to load an imported resource.

from Loader
__construct(ContainerBuilder $container, FileLocatorInterface $locator)

Constructor.

from FileLoader
setCurrentDir($dir)

from FileLoader
getLocator()

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

Loads a resource.

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

Returns true if this class supports the given resource.

Details

in Loader at line 30
public LoaderResolverInterface getResolver()

Gets the loader resolver.

Return Value

LoaderResolverInterface A LoaderResolverInterface instance

in Loader at line 40
public setResolver(LoaderResolverInterface $resolver)

Sets the loader resolver.

Parameters

LoaderResolverInterface $resolver A LoaderResolverInterface instance

in FileLoader at line 64
public mixed import(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null)

Imports a resource.

Parameters

mixed $resource A Resource
string $type The resource type
bool $ignoreErrors Whether to ignore import errors or not
string $sourceResource The original resource importing the new resource

Return Value

mixed

Exceptions

FileLoaderLoadException
FileLoaderImportCircularReferenceException

in Loader at line 68
public LoaderInterface resolve(mixed $resource, string $type = null)

Finds a loader able to load an imported resource.

Parameters

mixed $resource A Resource
string $type The resource type

Return Value

LoaderInterface A LoaderInterface instance

Exceptions

FileLoaderLoadException if no loader is found

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

Constructor.

Parameters

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

in FileLoader at line 41
public setCurrentDir($dir)

Parameters

$dir

in FileLoader at line 46
public getLocator()

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

Loads a resource.

Parameters

mixed $file The resource
string $type The resource type

Exceptions

InvalidArgumentException When ini file is not valid

at line 58
public bool 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

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