Public Method Details |
&singleton |
public object Modules &singleton()
|
|
|
Returns |
object Modules reference |
|
isModule |
public boolean isModule(string $module)
|
|
|
Parameter |
|
|
Returns |
boolean |
|
addModule |
public void addModule(string $module, [ string $label ])
|
|
Pushing a module w/ same name as a module already on the stack will overwrite the first one.
|
Parameter |
|
string |
$module |
|
|
The name of the module we are adding. |
|
|
string |
$label |
= >>''<< |
|
Display name for the module |
|
Returns |
void |
|
setCapabilities |
public void setCapabilities(string $module, [ array $provides ])
|
|
Omitting the second param, or passing a null param will result in emptying the array.
|
Parameter |
|
string |
$module |
|
|
The module name. |
|
|
array |
$provides |
= >>null<< |
|
The array of capabilities -- e.g. 'list', 'detail', etc. that module provides. |
|
Returns |
void |
|
addDependency |
public void addDependency(string $module, string $dep_module)
|
|
This method doesn't really do anything (i.e. doesn't return an error).
|
Parameter |
|
string |
$module |
|
|
The module that depends. |
|
|
string |
$dep_module |
|
|
The module that is depended on. |
|
Returns |
void |
|
setAttribute |
public void setAttribute(string $module, string $attr_name, mixed $attr_value)
|
|
This is a catchall for handling useful attributes of modules that we don't want to have separate methods for -- e.g. 'visible' or 'application' etc.
|
Parameter |
|
string |
$module |
|
|
The module name for which we are setting an attrib. |
|
|
string |
$attr_name |
|
|
The attribute name that we are setting. |
|
|
mixed |
$attr_value |
|
|
The value for the attribute. |
|
Returns |
void |
|
getAttribute |
public mixed getAttribute(string $module, string $attr_name)
|
|
Used in conjunction / as the counterpart to setAttribute.
|
Parameter |
|
string |
$module |
|
|
The module name for which we are getting an attrib. |
|
|
string |
$attr_name |
|
|
The attribute name that we are getting. |
|
Returns |
mixed The value of the $attr_name attribute or null. |
|
aggregateAttribute |
public array aggregateAttribute(string $attr_name, [ array $modules ])
|
|
|
Parameter |
|
string |
$attr_name |
|
|
The attribute name. |
|
|
array |
$modules |
= >>null<< |
|
Can specify subset of modules within which to aggregate specified attribute. |
|
Returns |
array attributes |
|
findModules |
public array findModules(string $attrib_name, mixed $attrib_value, [ boolean $strict ])
|
|
This will start out being very simple -- pass it an attribute name and value, and it will return all matching Module keys (which are by definition unique).
|
Parameter |
|
string |
$attrib_name |
|
|
The attribute to search for. |
|
|
mixed |
$attrib_value |
|
|
The value of the attribute to match. |
|
|
boolean |
$strict |
= >>false<< |
|
Whether to also match type. |
|
Returns |
array The module keys (module names) that match the search. |
|
addCapability |
public void addCapability(string $module, string $action, [ string $label ])
|
|
on a given module, and is expected to translate into a filesystem file (PHP script)
|
Parameter |
|
string |
$module |
|
|
The module name. |
|
|
string |
$action |
|
|
The capability -- e.g. 'list', 'detail', etc. that module provides. |
|
|
string |
$label |
= >>null<< |
|
A label for the module |
|
Returns |
void |
|
removeCapability |
public void removeCapability(string $module, string $action)
|
|
|
Parameter |
|
string |
$module |
|
|
The module name. |
|
|
string |
$action |
|
|
The capability -- e.g. 'list', 'detail', etc. that module provides. |
|
Returns |
void |
|
hasCapability |
public boolean hasCapability(string $module, string $action)
|
|
(whether module supports specified action)
|
Parameter |
|
string |
$module |
|
|
Module name. |
|
|
string |
$action |
|
|
The action to look for in module's 'provides' array. |
|
Returns |
boolean |
|
regGenericModule |
public void regGenericModule(string $module)
|
|
module, or there is an attempt to perform a non-existant action
|
Parameter |
|
string |
$module |
|
|
The module to use for requests that do not exist. |
|
Returns |
void |
|
getGenericModule |
public string getGenericModule()
|
|
|
Returns |
string The name of the generic module. |
|