Documentation

FileLocator extends FileLocator
in package

FileLocator uses the KernelInterface to locate resources in bundles.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$paths  : mixed
$kernel  : 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

Methods

locate()

Returns a full path for a given file name.

public locate(string $file[, string|null $currentPath = null ][, bool $first = true ]) : string|array<string|int, mixed>
Parameters
$file : string
$currentPath : string|null = null

The current path

$first : bool = 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
Return values
bool

Search results