Symfony2 API
Class

Symfony\Component\Routing\Loader\PhpFileLoader

class PhpFileLoader extends FileLoader

PhpFileLoader loads routes from a PHP file.

The file must return a RouteCollection instance.

Methods

__construct(FileLocatorInterface $locator)

Constructor.

from FileLoader
setCurrentDir($dir)

from FileLoader
getLocator()

from FileLoader
mixed import(mixed $resource, string $type = null, Boolean $ignoreErrors = false, string $sourceResource = null)

Imports a resource.

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 36
public __construct(FileLocatorInterface $locator)

Constructor.

Parameters

FileLocatorInterface $locator A FileLocatorInterface instance

in FileLoader at line 41
public setCurrentDir($dir)

Parameters

$dir

in FileLoader at line 46
public getLocator()

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

Imports a resource.

Parameters

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

Return Value

mixed

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

Loads a PHP file.

Parameters

mixed $file A PHP file path
string $type The resource type

at line 60
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