Public Member Functions |
| addDir ($name, $path, $position=false, $insertAfter=false) |
| findFile ($name, $searchIn=null, $params=null, $skip=0) |
| Default implementation will return the $name back if it's prefixed with '/' (so that it looks like a full path), and will check for any existing overrides.
|
Data Fields |
| $dirs = array() |
| $stateFilesRegExp = '/.+/' |
| $stateDirsRegExp = false |
Protected Member Functions |
| __construct ($id) |
| findFileInDirs ($name, $searchIn, $params, &$skip, &$dirIndex=null) |
| getFilesState () |
Constructor & Destructor Documentation
FileDiscovery_dirs::__construct |
( |
$ |
id | ) |
[protected] |
Member Function Documentation
FileDiscovery_dirs::addDir |
( |
$ |
name, |
|
|
$ |
path, |
|
|
$ |
position = false , |
|
|
$ |
insertAfter = false |
|
) |
| |
FileDiscovery_dirs::findFile |
( |
$ |
name, |
|
|
$ |
searchIn = null , |
|
|
$ |
params = null , |
|
|
$ |
skip = 0 |
|
) |
| |
Default implementation will return the $name back if it's prefixed with '/' (so that it looks like a full path), and will check for any existing overrides.
During search, most implementations will log candidates and valid paths in $this->candidates and $this->found, but only if these values are initialized to empty arrays beforehand.
To get all the matching files:
$fd->found = array();
$fd->findFile('FooBar', null, null, 0x7fff);
var_dump($fd->found);
$fd->found = null;
- Parameters:
-
string | $name | |
string | $searchIn | |
array | $params | |
| $skip | int|string How many potential entries to skip (both valid and invalid), before matching... You can pass a filepath, to find candidates after this match. |
Reimplemented from FileDiscovery.
Reimplemented in KWebFileDiscovery_template, and KWebFileDiscovery_class.
FileDiscovery_dirs::findFileInDirs |
( |
$ |
name, |
|
|
$ |
searchIn, |
|
|
$ |
params, |
|
|
&$ |
skip, |
|
|
&$ |
dirIndex = null |
|
) |
| [protected] |
FileDiscovery_dirs::getFilesState |
( |
| ) |
[protected] |
Field Documentation
FileDiscovery_dirs::$dirs = array() |
The documentation for this class was generated from the following file: