Configuration This is for accessing generic configuration files which store useful crappola like GST rate, file paths etc. This object features dynamically creatable/deletable configuration fields.
Eg. Usage (single-level configuration): $conf = new configuration("myconfigname"); $avar = $conf->value("gstrate"); Eg. Usage (dual-level config, user preferences example): $conf = new configuration("userprefs", "matthew"); $avar = $conf->value("background_colour"); // Example of changing it.. $conf->set_value("background_colour", "#fefefe"); $conf->put();
Located in /configuration-defs.php (line 46)
RenderableObject | --configuration
Class | Description |
---|---|
![]() |
The configurator class is simply a descendant class of configuration which sets the parent class into 'autoconfigure' mode. In this mode the forms have buttons supplied, and the instantiation of the class automatically processes form POSTs. |
Whether to show buttons on forms and auto-process POST or not
Identity if the current configuration
The name of the current configuration
Whether the configuration exists in database or not
Whether config definition exists in database or not
Array of configfield objects for the config
Whether field definitions have changed or not
Mode to display the configuration in a form
Set of configuration fields/values in this configuration set
Whether configuration data has changed or not
Constructor Create a new configuration object. Sets basic field attributes.
Create a new field for all configurations This retro-fits all sets of this config with the new field, and will assign the default value to each one.
Check if field exists
Remove a field from all sets of this config.
Get the configuration set.
Retreives the specified configuration set from database.
Render this configuration.
depending on which form_mode we are in, we render the configuration as an edit form, an add form, or a delete form.
Save the config.
Save this config to the database. Create a new one if it doesn't already exist.
Put a value in a field, in a set of the config.
Get value from a field in a set of the config.
Inherited From RenderableObject
RenderableObject::RenderableObject()
RenderableObject::html()
RenderableObject::render()
RenderableObject::wml()
RenderableObject::wmlup()
RenderableObject::xml()
Documentation generated by phpDocumentor 1.3.0RC3