waConfig

Management of the framework's dynamic configuration

Contents...

Methods

public static function add ($parameters = array())

Adds an array of parameters to the current configuration.

Parameters

Example

$params => array(
    'key1' => 'value1',
    'key2' => 'value2',
);
waConfig::add($params);

public static function clear()

Removes all configuration parametersконфигурации.

Example

waConfig::clear()

public static function get ($name, $default = null)

Returns the value of a configuration parameter.

Parameters

Example

waConfig::get('domain', 'localhost')

public static function getAll()

Returns the values of all configuration parameters.

Example

waConfig::getAll()

Result

Array
(
    [wa_path_root] => /var/www
    [wa_path_apps] => /var/www/wa-apps
    [wa_path_system] => /var/www/wa-system
    [wa_path_log] => /var/www/wa-log
    [wa_path_data] => /var/www/wa-data
    [wa_path_config] => /var/www/wa-config
    [wa_path_cache] => /var/www/wa-cache
    [wa_path_plugins] => /var/www/wa-plugins
    [wa_path_installer] => /var/www/wa-installer
)

public static function has ($name)

Verifies whether a value is set for the specified conifiguration parameter.

Parameters

Example

waConfig::has('domain')

Result

false //parameter with id 'domain' is not available

public static function set ($name, $value)

Sets a value for the specified configuration parameter.

Parameters

Example

waConfig::set('domain', 'localhost')