Class: I2CE FileSearch Caching: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 1: Line 1:
This article desrcibes the class '''I2CE_FileSearch_Caching''' which extends the class [[Class: I2CE_FileSearch | I2CE_FileSearch]]
This article desrcibes the class '''I2CE_FileSearch_Caching'''.
*Extends the class: [[Class: I2CE_FileSearch | I2CE_FileSearch]].
It is contained in the module [[iHRIS Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE]
It is contained in the module [[iHRIS Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE]


Line 25: Line 26:
*Signature: public function __construct($hidden,$current_working,$make_absolut)
*Signature: public function __construct($hidden,$current_working,$make_absolut)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.types.boolean.php boolean] $hidden<br/>Defaults to false.  Whether or not to search
* [http://www.php.net/manual/en/language.types.boolean.php boolean ] $hidden<br/>Defaults to false.  Whether or not to search
**Default Value: false
**Default Value: false
* [http://www.php.net/manual/en/language.types.boolean.php boolean] $current_working<br/>Defaults to false.  Whether or not to
* [http://www.php.net/manual/en/language.types.boolean.php boolean ] $current_working<br/>Defaults to false.  Whether or not to
**Default Value: false
**Default Value: false
* [http://www.php.net/manual/en/language.types.boolean.php boolean] $make_absolut<br/>Defaults to false.  Whether
* [http://www.php.net/manual/en/language.types.boolean.php boolean ] $make_absolut<br/>Defaults to false.  Whether
**Default Value: false
**Default Value: false
===clearCache()===
===clearCache()===
Line 39: Line 40:
we found, or null if we did not find the file.
we found, or null if we did not find the file.
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.types.string.php string] $category<br/>the category of the file
* [http://www.php.net/manual/en/language.types.string.php string ] $category<br/>the category of the file
* [http://www.php.net/manual/en/language.types.string.php string] $file_name<br/>the file name of the file we wish to find
* [http://www.php.net/manual/en/language.types.string.php string ] $file_name<br/>the file name of the file we wish to find
* [http://www.php.net/manual/en/language.types.boolean.php boolean] $find_all<br/>Defatults to false
* [http://www.php.net/manual/en/language.types.boolean.php boolean ] $find_all<br/>Defatults to false
**Default Value: false
**Default Value: false
===setPrefix()===
===setPrefix()===
Line 47: Line 48:
*Signature: public function setPrefix($prefix)
*Signature: public function setPrefix($prefix)
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
==Inherited Variables==
==Inherited Variables==
===$found_locales===
===$found_locales===

Revision as of 21:25, 16 October 2009

This article desrcibes the class I2CE_FileSearch_Caching.

It is contained in the module I2CE in the package I2CE

The class is 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 nt $stale_time

Methods

__construct()

Constructor for the FileSearch class hidden sub-directories. At the moment it does not have meaning on non unix like platforms. search the current working directory for the file. If so, it checks there first, before the other paths. or not to make a relative path absolute when adding it.

  • Signature: public function __construct($hidden,$current_working,$make_absolut)

Parameters:

  • boolean $hidden
    Defaults to false. Whether or not to search
    • Default Value: false
  • boolean $current_working
    Defaults to false. Whether or not to
    • Default Value: false
  • boolean $make_absolut
    Defaults to false. Whether
    • Default Value: false

clearCache()

  • Signature: public function clearCache()

search()

Find a file (or directory) of a certain category

  • Signature: public function search($category,$file_name,$find_all)
  • 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. Parameters:

  • string $category
    the category of the file
  • string $file_name
    the file name of the file we wish to find
  • boolean $find_all
    Defatults to false
    • Default Value: false

setPrefix()

Set the prefix to be used for the caching file search

  • Signature: public function setPrefix($prefix)

Parameters:

Inherited Variables

$found_locales

Theis protected variable is inherited from I2CE_FileSearch->$found_locales

$preferred_locales

Theis protected variable is inherited from I2CE_FileSearch->$preferred_locales

$ordered_paths

Theis protected variable is inherited from I2CE_FileSearch->$ordered_paths

$absolut

Theis protected variable is inherited from I2CE_FileSearch->$absolut

$search_hidden

Theis protected variable is inherited from I2CE_FileSearch->$search_hidden

$search_cwd

Theis protected variable is inherited from I2CE_FileSearch->$search_cwd

$last_order

Theis protected variable is inherited from I2CE_FileSearch->$last_order

$checked_directories

Theis protected variable is inherited from I2CE_FileSearch->$checked_directories