configurationConfiguration 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 |
|---|---|
configurator
|
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. |
configuration
configuration
([string $name = "default"], [string $id = "default"], [bool $auto = false])
void
field_create
(string $fname, [string $ftype = "text"], [string $flist = ""], [string $default = "???"])
mixed
$autoconfigurate
= false (line 75)
Whether to show buttons on forms and auto-process POST or not
mixed
$config_id
= "default" (line 51)
Identity if the current configuration
mixed
$config_name
= "default" (line 49)
The name of the current configuration
mixed
$db_configuration_exists
= false (line 66)
Whether the configuration exists in database or not
mixed
$db_config_exists
= false (line 63)
Whether config definition exists in database or not
mixed
$fields
(line 53)
Array of configfield objects for the config
mixed
$fieldschanged
= false (line 69)
Whether field definitions have changed or not
mixed
$form_mode
= "edit" (line 60)
Mode to display the configuration in a form
mixed
$set
(line 55)
Set of configuration fields/values in this configuration set
mixed
$setchanged
= false (line 72)
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