Documentation

FileLocator

Locates the file that contains the metadata information for a given class name.

This behavior is independent of the actual content of the file. It just detects the file which is responsible for the given class name.

Table of Contents

Methods

fileExists()  : bool
Checks if a file can be found for this class name.
findMappingFile()  : string
Locates mapping file for the given class name.
getAllClassNames()  : array<int, string>
Gets all class names that are found with this file locator.
getFileExtension()  : string|null
Gets the file extension that mapping files are suffixed with.
getPaths()  : array<int, string>
Gets all the paths that this file locator looks for mapping files.

Methods

fileExists()

Checks if a file can be found for this class name.

public fileExists(string $className) : bool
Parameters
$className : string
Return values
bool

findMappingFile()

Locates mapping file for the given class name.

public findMappingFile(string $className) : string
Parameters
$className : string
Return values
string

getAllClassNames()

Gets all class names that are found with this file locator.

public getAllClassNames(string $globalBasename) : array<int, string>
Parameters
$globalBasename : string

Passed to allow excluding the basename.

Tags
psalm-return

list

Return values
array<int, string>

getFileExtension()

Gets the file extension that mapping files are suffixed with.

public getFileExtension() : string|null
Return values
string|null

getPaths()

Gets all the paths that this file locator looks for mapping files.

public getPaths() : array<int, string>
Return values
array<int, string>

        
On this page

Search results