PHP. module_list

Class that does the work of indexing and caching information regarding directories of multiple modules.

See Also: <PHP.module>

Summary
Class that does the work of indexing and caching information regarding directories of multiple modules.
Scans directory for modules
Determine if the current directory is cached properly
Get list of categories.
Checks to see if a module exists in the loaded list
Resolve module class name into textual module name

Functions

constructor

Parameters

$packageString defining the name of the package
$_options(optional) Associative array of options to be passed to the constructor.
  • cache_file - File to hold the cache information
  • directory - Directory location
  • display_hidden - Boolean, force display of hidden modules
  • recursive - Boolean, whether or not to recursively scan
  • suffix - File suffix filter

_scan_directory

function _scan_directory ($dir,  
$recurse =  false)

Scans directory for modules

Parameters

$dirDirectory name
$recurse(optional) Whether or not to recurse.  Default is false.

cached

function cached ($dir_name)

Determine if the current directory is cached properly

Parameters

$dir_nameDirectory name to check

Returns

Boolean, cached state of directory.

categories

function categories ()

Get list of categories.

Returns

Array of categories or NULL if none

check_for

function check_for ($module_name)

Checks to see if a module exists in the loaded list

Parameters

$module_nameModule to check for

Returns

Boolean, whether module exists in the loaded list.

get_module_name

function get_module_name ($module)

Resolve module class name into textual module name

Parameters

$moduleName of module class

Returns

Textual name of the module

function _scan_directory ($dir,  
$recurse =  false)
Scans directory for modules
function cached ($dir_name)
Determine if the current directory is cached properly
function categories ()
Get list of categories.
function check_for ($module_name)
Checks to see if a module exists in the loaded list
function get_module_name ($module)
Resolve module class name into textual module name