Module Class
This is a parent class that all PICKLES modules should be extending. Each module can specify it's own meta data and whether or not a user must be properly authenticated to view the page. Currently any pages without a template are treated as pages being requested via AJAX and the return will be JSON encoded. In the future this may need to be changed out for logic that allows the requested module to specify what display type(s) it can use.
Located in /classes/Module.php (line 28)
Object | --Module
AJAX
Whether or not the page must be loaded via AJAX and if so, what pages are allowed to access it and the request method.
Database object
Meta description
Default display engine
Defaults to PHP but could be set to JSON, XML or RSS. Value is overwritten by the config value if not set by the module.
Meta keywords (comma separated)
Request Data
Modules should not interact with $_REQUEST, $_POST or $_GET directly as the contents could be unsafe. The Controller cleanses this data and sets it into this variable for safe access by the module.
Secure
Whether or not the page should be loaded via SSL.
Security settings of the page
Session
Whether or not a session should be established.
Default template
Defaults to null but could be set to any valid template basename. The value is overwritten by the config value if not set by the module. The display engine determines what the file extension should be.
Page title
Inherited from Object
Object::$config
Object::$instances
Constructor
The constructor does nothing by default but can be passed a boolean variable to tell it to automatically run the __default() method. This is typically used when a module is called outside of the scope of the controller (the registration page calls the login page in this manner.
Sets the Request
Default "Magic" Method
This function is overloaded by the module. The __default() method is where you want to place any code that needs to be executed at runtime. The reason the code isn't in the constructor is because the module must be instantiated before the code is executed so that the controller script is aware of the authentication requirements.
Magic Getter Method
Attempts to load the module variable. If it's not set, will attempt to load from the config.
Magic Setter Method
Prohibits the direct modification of module variables.
Inherited From Object
Object::__construct()
Object::getInstance()
Object::__destruct()
Documentation generated on Sun, 17 Oct 2010 23:17:23 -0400 by phpDocumentor 1.4.3