ConfigFileFinder
in package
Class ConfigFileFinder
Table of Contents
Properties
- $base : string
Methods
- getFiles() : array<string|int, mixed>
- Return all locations for all the files with a timestamp.
- listFiles() : array<string|int, mixed>
- Return all paths for all the files with a timestamp.
- locateFile() : array<string|int, mixed>
- Return all existing locations for a single file with a timestamp.
- locateFileInFolder() : array<string|int, mixed>
- Find filename from a list of folders.
- locateFiles() : array<string|int, mixed>
- Return all locations for all the files with a timestamp.
- locateInFolders() : array<string|int, mixed>
- Find filename from a list of folders.
- setBase() : $this
Properties
$base
protected
string
$base
= ''
Methods
getFiles()
Return all locations for all the files with a timestamp.
public
getFiles(array<string|int, mixed> $paths[, string $pattern = '|\.yaml$|' ][, int $levels = -1 ]) : array<string|int, mixed>
Parameters
- $paths : array<string|int, mixed>
-
List of folders to look from.
- $pattern : string = '|\.yaml$|'
-
Pattern to match the file. Pattern will also be removed from the key.
- $levels : int = -1
-
Maximum number of recursive directories.
Return values
array<string|int, mixed>listFiles()
Return all paths for all the files with a timestamp.
public
listFiles(array<string|int, mixed> $paths[, string $pattern = '|\.yaml$|' ][, int $levels = -1 ]) : array<string|int, mixed>
Parameters
- $paths : array<string|int, mixed>
-
List of folders to look from.
- $pattern : string = '|\.yaml$|'
-
Pattern to match the file. Pattern will also be removed from the key.
- $levels : int = -1
-
Maximum number of recursive directories.
Return values
array<string|int, mixed>locateFile()
Return all existing locations for a single file with a timestamp.
public
locateFile(array<string|int, mixed> $paths, string $name[, string $ext = '.yaml' ]) : array<string|int, mixed>
Parameters
- $paths : array<string|int, mixed>
-
Filesystem paths to look up from.
- $name : string
-
Configuration file to be located.
- $ext : string = '.yaml'
-
File extension (optional, defaults to .yaml).
Return values
array<string|int, mixed>locateFileInFolder()
Find filename from a list of folders.
public
locateFileInFolder(string $filename, array<string|int, mixed> $folders) : array<string|int, mixed>
Note: Only finds the last override.
Parameters
- $filename : string
- $folders : array<string|int, mixed>
Return values
array<string|int, mixed>locateFiles()
Return all locations for all the files with a timestamp.
public
locateFiles(array<string|int, mixed> $paths[, string $pattern = '|\.yaml$|' ][, int $levels = -1 ]) : array<string|int, mixed>
Parameters
- $paths : array<string|int, mixed>
-
List of folders to look from.
- $pattern : string = '|\.yaml$|'
-
Pattern to match the file. Pattern will also be removed from the key.
- $levels : int = -1
-
Maximum number of recursive directories.
Return values
array<string|int, mixed>locateInFolders()
Find filename from a list of folders.
public
locateInFolders(array<string|int, mixed> $folders[, string|null $filename = null ]) : array<string|int, mixed>
Parameters
- $folders : array<string|int, mixed>
- $filename : string|null = null
Return values
array<string|int, mixed>setBase()
public
setBase(string $base) : $this
Parameters
- $base : string