Class: I2CE FileSearch Caching: Difference between revisions
From IHRIS Wiki
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
*Extends the class: [[Class: I2CE_FileSearch | I2CE_FileSearch]]. | *Extends the class: [[Class: I2CE_FileSearch | I2CE_FileSearch]]. | ||
*Parent Classses: [[Class: I2CE_FileSearch | I2CE_FileSearch]] | *Parent Classses: [[Class: I2CE_FileSearch | I2CE_FileSearch]] | ||
*Location: Part of the module [[ | *Location: Part of the module [[I2CE Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.0-release/annotate/head:/lib/I2CE_FileSearch_Caching.php lib/I2CE_FileSearch_Caching.php] | *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.0-release/annotate/head:/lib/I2CE_FileSearch_Caching.php lib/I2CE_FileSearch_Caching.php] | ||
I2CE_FileSearch_Caching @todo Better Documentation | I2CE_FileSearch_Caching @todo Better Documentation | ||
Line 41: | Line 41: | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $prefix | ** [http://www.php.net/manual/en/language.types.string.php string ] $prefix | ||
[[Category:Class Documentation]] | [[Category:Class Documentation]] |
Revision as of 12:08, 19 October 2009
This article describes the class I2CE_FileSearch_Caching.
- Extends the class: I2CE_FileSearch.
- Parent Classses: I2CE_FileSearch
- Location: Part of the module I2CE in the package I2CE
- Source: Defined in the file lib/I2CE_FileSearch_Caching.php
I2CE_FileSearch_Caching @todo Better Documentation
Variables
$prefix
The rpefix to use fir the APC keys
- Type: protected $prefix
$stale_time
A local copy of the data (if any) stored in the magic data at /I2CE/fileSearch/stale_time
- Type: protected int $stale_time
Methods
__construct()
Constructor for the FileSearch class
- Signature: public function __construct($hidden,$current_working,$make_absolut)
- Parameters:
- boolean $hidden
Defaults to false. Whether or not to search hidden sub-directories. At the moment it does not have meaning on non unix like platforms.- Default Value: false
- boolean $current_working
Defaults to false. Whether or not to search the current working directory for the file. If so, it checks there first, before the other paths.- Default Value: false
- boolean $make_absolut
Defaults to false. Whether or not to make a relative path absolute when adding it.- Default Value: false
- boolean $hidden
clearCache()
- Signature: public function clearCache()
search()
Find a file (or directory) of a certain category
- Signature: public function search($category,$file_name,$find_all)
- Parameters:
- Returns: mixed.
Returns either a string which is the path and file name of the file we found, or null if we did not find the file.
setPrefix()
Set the prefix to be used for the caching file search
- Signature: public function setPrefix($prefix)
- Parameters:
- string $prefix