Erebot  latest
A modular IRC bot for PHP 5.3+
Erebot\Config\Network Class Reference

This class contains the configuration for an IRC network. More...

+ Inheritance diagram for Erebot\Config\Network:

Public Member Functions

 __construct (\Erebot\Interfaces\Config\Main $mainCfg,\SimpleXMLElement $xml)
 
 __destruct ()
 
 getChannelCfg ($channel)
 
 getChannels ()
 
 getName ()
 
 getServerCfg ($server)
 
 getServers ()
 
- Public Member Functions inherited from Erebot\Config\Proxy
 __clone ()
 
 __destruct ()
 
 getMainCfg ()
 
 getModule ($moduleName)
 
 getModules ($recursive)
 
 getTranslator ($component)
 
 parseBool ($module, $param, $default=null)
 
 parseInt ($module, $param, $default=null)
 
 parseReal ($module, $param, $default=null)
 
 parseString ($module, $param, $default=null)
 
- Public Member Functions inherited from Erebot\Interfaces\Config\Proxy
 getMainCfg ()
 
 getModule ($moduleName)
 
 getModules ($recursive)
 
 getTranslator ($component)
 
 parseBool ($module, $param, $default=null)
 
 parseInt ($module, $param, $default=null)
 
 parseReal ($module, $param, $default=null)
 
 parseString ($module, $param, $default=null)
 

Protected Attributes

 $channels
 A list of channel configurations which apply to this network.
 
 $maincfg
 Main configuration this object depends on.
 
 $name
 The name of this IRC network.
 
 $servers
 A list of server configurations which apply to this network.
 
- Protected Attributes inherited from Erebot\Config\Proxy
 $locale
 The current locale.
 
 $modules
 Array of modules loaded at this particular configuration level.
 
 $proxified
 Reference to a proxified object.
 

Additional Inherited Members

- Static Public Member Functions inherited from Erebot\Config\Proxy
static parseBoolHelper ($value)
 
static parseIntHelper ($value)
 
static parseRealHelper ($value)
 
- Protected Member Functions inherited from Erebot\Config\Proxy
 __construct (\Erebot\Interfaces\Config\Proxy $proxified,\SimpleXMLElement $xml)
 
 parseSomething ($module, $param, $default,\Erebot\CallableInterface $parser, $origin,\Erebot\CallableInterface $checker)
 

Detailed Description

This class contains the configuration for an IRC network.

This class deals with settings which apply for a whole IRC network, such as its name. It also contains references to instances that implement the Erebot::Interfaces::Config::Server or Erebot::Interfaces::Config::Channel interfaces and apply to this IRC network.

Definition at line 33 of file Network.php.

Constructor & Destructor Documentation

Erebot\Config\Network::__construct ( \Erebot\Interfaces\Config\Main  $mainCfg,
\SimpleXMLElement  $xml 
)

Creates a new configuration object for an IRC network.

Parameters
Erebot::Interfaces::Config::Main$mainCfgA reference to the main configuration for the bot.
SimpleXMLElement$xmlAn XML node containing the configuration data for this network.

Definition at line 57 of file Network.php.

Erebot\Config\Network::__destruct ( )

Destructor.

Definition at line 89 of file Network.php.

Member Function Documentation

Erebot\Config\Network::getChannelCfg (   $channel)

Returns the configuration object for a particular IRC channel.

Parameters
string$channelThe name of the IRC channel whose configuration we're interested in.
Return values
Erebot::Interfaces::Config::ChannelThe configuration object for that channel.
Exceptions
Erebot::NotFoundExceptionNo such channel has been configured on this IRC network.

Implements Erebot\Interfaces\Config\Network.

Definition at line 120 of file Network.php.

Erebot\Config\Network::getChannels ( )

Returns all IRC channel configurations.

Return values
arrayA list of all channel configuration instances stored by this network configuration, as objects implementing Erebot::Interfaces::Config::Channel.

Implements Erebot\Interfaces\Config\Network.

Definition at line 129 of file Network.php.

References Erebot\Config\Network\$channels.

Erebot\Config\Network::getName ( )

Returns the name of this IRC network.

Return values
stringThe name of this IRC network.

Implements Erebot\Interfaces\Config\Network.

Definition at line 99 of file Network.php.

References Erebot\Config\Network\$name.

Erebot\Config\Network::getServerCfg (   $server)

Returns the configuration object for a particular IRC server.

Parameters
string$serverThe name of the IRC server whose configuration we're interested in.
Return values
Erebot::Interfaces::Config::ServerThe configuration object for that server.
Exceptions
Erebot::NotFoundExceptionNo such server has been configured on this IRC network.

Implements Erebot\Interfaces\Config\Network.

Definition at line 105 of file Network.php.

Erebot\Config\Network::getServers ( )

Returns all IRC server configurations.

Return values
arrayA list of all server configuration instances stored by this network configuration, as objects implementing Erebot::Interfaces::Config::Server.

Implements Erebot\Interfaces\Config\Network.

Definition at line 114 of file Network.php.

References Erebot\Config\Network\$servers.


The documentation for this class was generated from the following file: