FileLocator
extends FileLocator
in package
FileLocator uses the KernelInterface to locate resources in bundles.
Tags
Table of Contents
- $paths : mixed
- $kernel : mixed
- $path : mixed
- __construct() : mixed
- locate() : string|array<string|int, mixed>
- Returns a full path for a given file name.
- isAbsolutePath() : bool
- Returns whether the file path is an absolute path.
Properties
$paths
protected
mixed
$paths
$kernel
private
mixed
$kernel
$path
private
mixed
$path
Tags
Methods
__construct()
public
__construct(KernelInterface $kernel) : mixed
Parameters
- $kernel : KernelInterface
Return values
mixed —locate()
Returns a full path for a given file name.
public
locate(mixed $file[, mixed $currentPath = null ][, mixed $first = true ]) : string|array<string|int, mixed>
Parameters
- $file : mixed
- $currentPath : mixed = null
-
The current path
- $first : mixed = true
-
Whether to return the first occurrence or an array of filenames
Return values
string|array<string|int, mixed> —The full path to the file or an array of file paths
isAbsolutePath()
Returns whether the file path is an absolute path.
private
isAbsolutePath(string $file) : bool
Parameters
- $file : string