Klasse zum Laden einer Konfiguration aus der Datenbank

copyright (c) Copyright 2008-2013 by ManuAdminMod (http://www.manuadminmod.de)
license Creative Commons BY-NC-ND 3.0 (http://www.creativecommons.org/licenses/by-nc-nd/3.0/)
author manu (manu@manuadminmod.de)
since 1.0
version 1.0

 Methods

Erstellt ein neuen Config-Objekt auf Basis einer MySQL-Abfrage

__construct(\Daemon\Lib\Database\MySQL_Stmt $mysql_stmt, array $args) : void

Der Parameter muss ein unausgeführtes MySQL-Stmt sein
Erstes Feld ist Key, zweites Feld ist Value

Parameters

$args

Überladen

__get(string $offset) : string
Inherited
inherited_from \Daemon\Lib\Config\Config::__get()

Parameters

$offset

string

Exceptions

\Daemon\Lib\Config\UndefinedConfigVariableException

Returns

string

Überladen

__isset(string $offset) : boolean
Inherited
inherited_from \Daemon\Lib\Config\Config::__isset()

Parameters

$offset

string

Returns

boolean

DO NOT USE

__set(string $offset, string $value) 
Inherited

This Object is read-only for arrayAccess and overloading

inherited_from \Daemon\Lib\Config\Config::__set()

Parameters

$offset

string

$value

string

Exceptions

\BadMethodCallException

DO NOT USE

__unset(string $offset) 
Inherited

This Object is read-only for arrayAccess and overloading

inherited_from \Daemon\Lib\Config\Config::__unset()

Parameters

$offset

string

Exceptions

\BadMethodCallException

offsetExists()

offsetExists($offset) 
Inherited
see \Daemon\Lib\Config\ArrayAccess::offsetExists()
inherited_from \Daemon\Lib\Config\Config::offsetExists()

Parameters

$offset

(non-PHPdoc)

offsetGet($offset) 
Inherited
see \Daemon\Lib\Config\ArrayAccess::offsetGet()
inherited_from \Daemon\Lib\Config\Config::offsetGet()

Parameters

$offset

Exceptions

\Daemon\Lib\Config\UndefinedConfigVariableException

DO NOT USE

offsetSet($offset, $value) 
Inherited

This Object is read-only for arrayAccess and overloading

see \Daemon\Lib\Config\ArrayAccess::offsetSet()
inherited_from \Daemon\Lib\Config\Config::offsetSet()

Parameters

$offset

$value

Exceptions

\BadMethodCallException

DO NOT USE

offsetUnset($offset) 
Inherited

This Object is read-only for arrayAccess and overloading

see \Daemon\Lib\Config\ArrayAccess::offsetUnset()
inherited_from \Daemon\Lib\Config\Config::offsetUnset()

Parameters

$offset

Exceptions

\BadMethodCallException

Bietet "sicheren" Zugriff auf eine Variable

secureGet(string $name, mixed $defaultValue) : mixed
Inherited

Diese Funktion vermeidet eine Exception, wenn ein Zugriff auf eine undefinierte Variable stattfindet. Stattdessen wird der übergebene $defaultValue zurückgegeben.

inherited_from \Daemon\Lib\Config\Config::secureGet()

Parameters

$name

string

Name der Config-Variablen

$defaultValue

mixed

Alternativ-Wert

Returns

mixed

Prüft, ob die Konfiguration mittlerweile aktualisiert wurde und neu geladen werden muss

isOutdated() : boolean

Lädt die Konfiguration und gibt sie als Array zurück

load() : string[]
see \Daemon\Core\Config\Config::load()

Returns

string[]

Prüft, ob die Konfiguration neu geladen werden muss

checkUpToDate() : void
Inherited

Wird vor jeden Zugriff auf eine Variable ausgeführt, um zu prüfen, ob die Konfiguration neu geladen werden muss

inherited_from \Daemon\Lib\Config\Config::checkUpToDate()

Validiert und speichert die Konfiguration in der Member Variable

setConfig(array $config) 
Inherited
inherited_from \Daemon\Lib\Config\Config::setConfig()

Parameters

$config

string[]

Konfiguration aus load()

 Properties

 

$args : mixed[]
 

$config : string[]
Inherited
inherited_from \Daemon\Lib\Config\Config::$$config