Core::arbitModuleDefintion
Class arbitModuleDefintion
Base class for module definitions. Base class for module definitions.
Each module is required to extend this class an return an instance of it from the file definition.php in the modules root directory.
This struct defines the way the core interacts with the module. The struct may be extended in later releases to contain more information, but will always provide meaningful default values in this case.
When extending this class you normally should only need to extend the property array to contain your module specific values. If your module has a completely different structure you may also overwrite the __get() method and do some magic in there to receive your values. But keep in mind, that this class is instantiated on *each* call, so it should *not* perform any performance intensive stuff.
arbitBaseStruct
|
--arbitModuleDefintion
Author(s):
|
Version:
|
$Revision: 1692 $ |
|
License:
|
GPL |
Descendants
Properties
|
array |
read
|
$autoload
Array with a class to filename mapping for autoloading of module classes. |
|
string |
read
|
$controller
The class name of the modules main controller, where all requests to the module are dispatched too. This name should normally be arbit<ModuleName>Controller. |
|
string |
read
|
$path
The root path of the module. This should normally just point to __DIR__ in the implemented module definition. |
|
array |
read
|
$permissions
Array with the module specific permissions as a key and a description of the respective permission as a value. |
|
array |
read
|
$signals
Array with all signals the module may emit. The key of teh array is the name of the signal, and should be prefixed with the module name, and the value is a description of the repective signal, eg. describes when the signal is thrown. |
|
array |
read
|
$slots
Array containing the slots a module registered for and the associated callback, hwich should be called by the signal slot manager, when the signal has been trigered. |
|
string |
read
|
$templateDirectory
Folder where the module specific templates can be found. Normally you should NOT chnage this. The path is given relative to the modules root directory. |
Member Variables
|
protected array |
$caches
= array()
Array with caches registered on initialization
Each cache must have a unique name, normally prefixed with the module identifier. time to live for the cache.
Array with caches registered on initialization
Each cache must have a unique name, normally prefixed with the module identifier. The definition array should at least contain a path and a time to live for the cache.
'name' => array(
'path' => 'dir/',
),
...
|
|
protected array |
$commands
= array()
List of command definitions of the module
Array containing command names and their assiciated classes in the module definition.
List of command definitions of the module
Array containing command names and their assiciated classes in the module definition.
array(
'mymodule.mycommand' => 'myModuleMyCommand',
...
)
|
|
protected array |
$couchDbDocuments
= array()
CouchDB documents to be registered at the document manager.
CouchDB documents to be registered at the document manager. |
|
protected array |
$couchDbViews
= array()
CouchDB documents to be registered at the document manager.
CouchDB documents to be registered at the document manager. |
|
protected array |
$facades
= array()
Array with facades registered on initialization
Array with facedes for all known database backends linked with their respective implementation.
Array with facades registered on initialization
Array with facedes for all known database backends linked with their respective implementation.
'couchdb' => array(
'name' => 'class',
),
|
|
protected array |
$properties
= array( 'autoload' => null, 'permissions' => array( ),'slots'=>array(),'signals'=>array(),'templateDirectory'=>'templates/','controller'=>null,'path'=>null,)
Array containing the module structures properties.
Array containing the module structures properties.
Take a look at the property descriptions in the class level documentation for a more detailed description for each of the properties.
Do not add any properties to this array, which are not defined in this base class, because those might be used later on by the core. |
|
protected array |
$viewModels
= array()
List of view models used by the module
List of used view handlers associated with a list of view models used by the module, each associated with a callback to the concrete handler implementation to visit the view model.
List of view models used by the module
List of used view handlers associated with a list of view models used by the module, each associated with a callback to the concrete handler implementation to visit the view model.
'arbitViewXHtmlHandler' => array(
'myViewModel' => 'myXHtmlHandler::showMyModel',
...
),
...
|
Method Summary
|
protected void |
initializeCaches(
)
Initialize module caches |
|
protected void |
initializeCommands(
)
Initialize commands |
|
protected void |
initializeCouchDbDocuments(
)
Initialize CouchDB document classes |
|
protected void |
initializeCouchDbViews(
)
Initialize CouchDB view classes |
|
protected void |
initializeFacades(
)
Initialize facades |
|
public void |
initializeModule(
)
Initialize module
Initialize the module using the values defined in the module definition class properties. |
|
protected void |
initializeViews(
)
Initialize views |
|
public mixed |
__get(
$property
)
Get property value
Get property values. properties on the first request to this property. sued to load the autoload array only when it is requested. |
Inherited Methods
Methods
initializeCaches
void
initializeCaches(
)
Initialize module caches
initializeCommands
void
initializeCommands(
)
Initialize commands
initializeCouchDbDocuments
void
initializeCouchDbDocuments(
)
Initialize CouchDB document classes Initialize CouchDB document classes
initializeCouchDbViews
void
initializeCouchDbViews(
)
Initialize CouchDB view classes Initialize CouchDB view classes
initializeFacades
void
initializeFacades(
)
Initialize facades
initializeModule
void
initializeModule(
)
Initialize module
Initialize the module using the values defined in the module definition class properties. Initialize module
Initialize the module using the values defined in the module definition class properties.
initializeViews
void
initializeViews(
)
Initialize views
__get
mixed
__get(
string
$property
)
Get property value
Get property values. properties on the first request to this property. sued to load the autoload array only when it is requested. Get property value
Get property values. May be used for delayed intialisation of some properties on the first request to this property. This is for example sued to load the autoload array only when it is requested.
Parameters:
| Name |
Type |
Description |
$property |
string |
|
|