ZenMagick 0.9.10


zenmagick.store.shared.services\ZMConfig
services\ZMConfig.php at line 33

Class ZMConfig

ZMObject
└─ZMConfig

public class ZMConfig
extends ZMObject

Configuration.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct()

Create new instance.

void

createConfigValue(string title, string key, string value, int groupId, string description, int sortOrder, string setFunction, string useFunction)

Create config value.

ZMConfigGroup

getConfigGroupForId(int groupId)

Get a configuration group.

array

getConfigGroups()

Get all configuration groups.

array

getConfigValues(string pattern)

Get all config values for a given key pattern.

array

getValuesForGroupId(int groupId)

Get all config values for a given group id.

static void

instance()

Get instance.

array

loadAll()

Load all configuration values.

protected array

loadValuesForSql(string sql, array args)

Load config values for the given sql and args.

void

removeConfigValue(string key)

Remove config value.

void

removeConfigValues(string pattern)

Remove config value for the given key pattern.

void

updateConfigValue(string key, string value)

Update config value.

Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

services\ZMConfig.php at line 38

__construct

public void __construct()

Create new instance.


services\ZMConfig.php at line 69

createConfigValue

public void createConfigValue(string title, string key, string value, int groupId, string description, int sortOrder, string setFunction, string useFunction)

Create config value.

Parameters:
title - The title.
key - The configuration key (with or without the common prefix).
value - The value.
groupId - The config group id.
description - The description; defaults to ''.
sortOrder - optional sort order; defaults to 0.
setFunction - The set function; defaults to null.
useFunction - The use function; defaults to null.

services\ZMConfig.php at line 307

getConfigGroupForId

public ZMConfigGroup getConfigGroupForId(int groupId)

Get a configuration group.

Parameters:
groupId - The group id.
Returns:
A ZMConfigGroup instance or null.

services\ZMConfig.php at line 319

getConfigGroups

public array getConfigGroups()

Get all configuration groups.

Returns:
List of ZMConfigGroup instances.

services\ZMConfig.php at line 255

getConfigValues

public array getConfigValues(string pattern)

Get all config values for a given key pattern.

Parameters:
pattern - The key pattern; for example 'foo_%'.
Returns:
A list of ZMConfigValue or ZMWidget instances.

services\ZMConfig.php at line 270

getValuesForGroupId

public array getValuesForGroupId(int groupId)

Get all config values for a given group id.

Parameters:
groupId - The group id.
Returns:
A list of ZMConfigValue or ZMWidget instances.

services\ZMConfig.php at line 52

instance

public static void instance()

Get instance.


services\ZMConfig.php at line 331

loadAll

public array loadAll()

Load all configuration values.

Returns:
Map of all configuration values.

services\ZMConfig.php at line 148

loadValuesForSql

protected array loadValuesForSql(string sql, array args)

Load config values for the given sql and args.

Parameters:
sql - The sql.
args - The query args.
Returns:
A list of ZMConfigValue or ZMWidget instances.

services\ZMConfig.php at line 284

removeConfigValue

public void removeConfigValue(string key)

Remove config value.

Parameters:
key - The config key.

services\ZMConfig.php at line 295

removeConfigValues

public void removeConfigValues(string pattern)

Remove config value for the given key pattern.

Parameters:
pattern - The key pattern; for example 'foo_%'.

services\ZMConfig.php at line 99

updateConfigValue

public void updateConfigValue(string key, string value)

Update config value.

Parameters:
key - The config key.
value - The new value.

ZenMagick 0.9.10