Class

Symfony\Component\Config\FileLocator

class FileLocator implements FileLocatorInterface

FileLocator uses an array of pre-defined paths to find files.

Methods

__construct(string|array $paths = array())

Constructor.

string|array locate(mixed $name, string $currentPath = null, Boolean $first = true)

Returns a full path for a given file name.

Details

at line 28
public __construct(string|array $paths = array())

Constructor.

Parameters

string|array $paths A path or an array of paths where to look for resources

at line 44
public string|array locate(mixed $name, string $currentPath = null, Boolean $first = true)

Returns a full path for a given file name.

Parameters

mixed $name The file name to locate
string $currentPath The current path
Boolean $first Whether to return the first occurrence or an array of filenames

Return Value

string|array The full path to the file|An array of file paths

Exceptions

InvalidArgumentException When file is not found