Class

Symfony\Component\Config\Loader\FileLoader

abstract class FileLoader extends Loader

FileLoader is the abstract class used by all built-in loaders that are file based.

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.

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

Finds a loader able to load an imported resource.

from Loader
__construct(FileLocatorInterface $locator)

Constructor.

setCurrentDir($dir)

getLocator()

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

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

at line 36
public __construct(FileLocatorInterface $locator)

Constructor.

Parameters

FileLocatorInterface $locator A FileLocatorInterface instance

at line 41
public setCurrentDir($dir)

Parameters

$dir

at line 46
public getLocator()