Documentation

FileLocatorInterface

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Methods

locate()  : string|array<string|int, mixed>
Returns a full path for a given file name.

Methods

locate()

Returns a full path for a given file name.

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

The file name to locate

$currentPath : string|null = null

The current path

$first : bool = true

Whether to return the first occurrence or an array of filenames

Tags
throws
InvalidArgumentException

If $name is empty

throws
FileLocatorFileNotFoundException

If a file is not found

Return values
string|array<string|int, mixed>

The full path to the file or an array of file paths


        
On this page

Search results