$parameter_cache
$parameter_cache :
midcom parameter support
get_parameter(string $domain, string $name) : string
Return a parameter from the database.
No event handlers are called here yet.
string | $domain | The parameter domain. |
string | $name | The parameter name. |
The parameter value or false otherwise (remember typesafe comparisons to protect against '' strings).
list_parameters(string $domain = null) : array
List the parameters of an object. This will either list the parameters of a single domain or the complete set of parameters, depending on the value of $domain.
It delegates the actual execution to two separate helper functions.
No event handlers are called here yet.
In case of a complete query, the result will be an associative array indexed by the domain name and containing another array with parameter name/value pairs. For example:
Array ( [Asgard] => Array ( [lang] => en_US [act] => view [actloc] => tree ) [AsgardTreeHost] => Array ( [selected] => host0 ) )
If you query only a single domain, the result will be a single associative array containing the parameter name/value pairs. For example:
Array ( [lang] => en_US [act] => view [actloc] => tree )
In both cases an empty Array will indicate that no parameter was found, while false will indicate a failure while querying the database.
string | $domain | The parameter domain to query, this may be null to indicate a full listing. |
Parameter list (see above for details) or false on failure.
set_parameter(string $domain, string $name, string $value) : boolean
Set a parameter to the value specified.
This is either a create or an update operation depending on whether there was already a parameter of that domain/name present, or not.
The user needs both update and parameter manipulation permission on the parent object for updates.
string | $domain | The Parameter Domain. |
string | $name | The Parameter name. |
string | $value | The Parameter value. If this is empty, the corresponding parameter is deleted. |
Indicating success.
delete_parameter(string $domain, string $name) : boolean
Delete a parameter.
Current implementation note: Deletion is not yet implemented in MgdSchema. Therefore we set the parameters to an empty string for now, which should have almost the same effect for most cases and thus is good enough for now. Note, that empty string parameters are filtered in the getter methods until this matter is resolved.
The user needs both update and parameter manipulation permission on the parent object for updates.
string | $domain | The Parameter Domain. |
string | $name | The Parameter name. |
Indicating success.