phpBB

Development Wiki

Umil.config add

From phpBB Development Wiki

umil::config_add –– Add a config setting using the Umil Library.

Description

string umil::config_add ( mixed $config_name [, string $config_value [, boolean $is_dynamic ]] )

Parameters

Parameter Required/Default Usage
config_name Required The name of the config setting to add
config_value default '' The value of the config setting to add
is_dynamic default false True for a dynamic config setting (one that gets selected from the database with each page load), false for a normal config setting

Return Values

Returns result or umil_end data

This article is a stub. You can help in improving Olympus Documentation by expanding it.


Examples

Example #1

Add a config item named 'test_mod_bool' with the value of (bool) true

$umil->config_add('test_mod_bool'true);

Example #2

Add a dynamic config item named 'test_mod_count' with a value of 0

$umil->config_add('test_mod_count'0true);

Example #3

Add multiple config items with one function call

$umil->config_add(array(
    array(
'test_mod_bool'true),
    array(
'test_mod_string''test'),
    array(
'test_mod_count'0true),
));

See Also