ZenMagick 0.9.1


org.zenmagick.service.ZMConfig

Class ZMConfig

ZMObject
|
+--ZMConfig

public class ZMConfig
extends ZMObject

Configuration.

Author:
mano
Version:
$Id: ZMConfig.php 957 2008-03-30 21:03:12Z DerManoMann $

Constructor Summary

ZMConfig()

Create new instance.

Method Summary
void

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

Create config value.

array

getConfigGroups()

Get all configuration groups.

array

getConfigValues(string pattern)

Get all config values for a given key pattern.

static void

instance()

Get instance.

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.ZMObject
backtrace, create, log, singleton

Constructor Detail

ZMConfig

public ZMConfig()

Create new instance. /


Method Detail

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.

getConfigGroups

public array getConfigGroups()

Get all configuration groups.

Returns:
List of ZMConfigGroup instances.

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 instances.

instance

public static void instance()

Get instance. /


removeConfigValue

public void removeConfigValue(string key)

Remove config value.

Parameters:
key - The config key.

removeConfigValues

public void removeConfigValues(string pattern)

Remove config value for the given key pattern.

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

updateConfigValue

public void updateConfigValue(string key, string value)

Update config value.

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

ZenMagick 0.9.1