DeBot Framework


DeBot\Config
core/Config.php at line 40

Class Config

Singleton
└─Config

public class Config
extends Singleton

DeBot Core - Singleton Created by dab ??? ?? 2009 Last Edited: Aug 15 2010 This class lets us makes all of the classes available anywhere via a static call. Also makes sure an object isn't declared more than once. Utilizes the get_called_class function only available in PHP 5.3+. Sorry non 5.3-ers :(

Author:
David (dab)
Version:
v1.0

Method Summary
boolean|array

getBot(string sBot)

A re-route of the getBotConfig

boolean|array

getBotConfig(string sBot)

Fetches the bot's config

array

getBots()

Get the config for all the bots

array

getConfig()

Returns the whole config

array

getServers()

Fetch all of our servers.

void

load(array aConfig)

Load the config and the instance of the config handler

void

offsetExists(mixed sKey)

void

offsetGet(mixed sKey)

void

offsetSet(mixed sKey, mixed mValue)

void

offsetUnset(mixed sKey)

Methods inherited from DeBot\Singleton
__construct, obj

Method Detail

core/Config.php at line 83

getBot

public boolean|array getBot(string sBot)

A re-route of the getBotConfig

Parameters:
sBot - The nick of the bot to fetch
Returns:
False if bot doesn't exist, array of the bot config

core/Config.php at line 67

getBotConfig

public boolean|array getBotConfig(string sBot)

Fetches the bot's config

Parameters:
sBot - The nick of the bot to fetch
Returns:
False if bot doesn't exist, array of the bot config

core/Config.php at line 103

getBots

public array getBots()

Get the config for all the bots

Returns:
The array of all of our bots

core/Config.php at line 113

getConfig

public array getConfig()

Returns the whole config

Returns:
The config created in /config.php

core/Config.php at line 93

getServers

public array getServers()

Fetch all of our servers.

Returns:
An array of our servers

core/Config.php at line 56

load

public void load(array aConfig)

Load the config and the instance of the config handler

Parameters:
aConfig - the config array.

core/Config.php at line 135

offsetExists

public void offsetExists(mixed sKey)

core/Config.php at line 121

offsetGet

public void offsetGet(mixed sKey)

core/Config.php at line 130

offsetSet

public void offsetSet(mixed sKey, mixed mValue)

core/Config.php at line 143

offsetUnset

public void offsetUnset(mixed sKey)

DeBot Framework