|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
This class stores configuration data about modules. More...
Inheritance diagram for Erebot\Config\Module:Public Member Functions | |
| __construct (\SimpleXMLElement $xml) | |
| __destruct () | |
| getName () | |
| getParam ($param) | |
| getParamsNames () | |
| isActive ($active=null) | |
Protected Attributes | |
| $active | |
| A boolean indicating whether the module is active or not. | |
| $name | |
| The name of the module. | |
| $params | |
| A dictionary mapping parameter names to their textual value. | |
This class stores configuration data about modules.
For each module at any configuration level, an instance of Erebot::Config::Module will be created.
Definition at line 30 of file Module.php.
| Erebot\Config\Module::__construct | ( | \SimpleXMLElement | $xml | ) |
Creates a new configuration object for a module.
| SimpleXMLElement | $xml | An XML node containing the configuration settings for the module. |
Definition at line 48 of file Module.php.
References Erebot\Config\Module\$active.
| Erebot\Config\Module::__destruct | ( | ) |
Destructor.
Definition at line 69 of file Module.php.
| Erebot\Config\Module::getName | ( | ) |
Returns the name of this module.
| string | The name of the module represented by this module configuration. |
Implements Erebot\Interfaces\Config\Module.
Definition at line 89 of file Module.php.
References Erebot\Config\Module\$name.
| Erebot\Config\Module::getParam | ( | $param | ) |
Returns the value for the given parameter.
| string | $param | The name of the parameter we are interested in. |
| string | The value of the parameter. |
| Erebot::InvalidValueException | The $param argument was not a valid parameter name. |
| Erebot::NotFoundException | There was no parameter with this name defined in the configuration file. |
Implements Erebot\Interfaces\Config\Module.
Definition at line 95 of file Module.php.
| Erebot\Config\Module::getParamsNames | ( | ) |
Returns the names of the parameters for this module.
| array | A list with the names (as strings) of the parameters configured for this module. |
Implements Erebot\Interfaces\Config\Module.
Definition at line 107 of file Module.php.
| Erebot\Config\Module::isActive | ( | $active = null | ) |
Gets/sets the active flag on this module.
| null | bool | $active | An optional parameter which can be used to change the value of the active flag for this module. |
| bool | The value of the active flag as it was before this method was called. |
| Erebot::InvalidValueException | The new value for the active flag is not a valid boolean value. |
Implements Erebot\Interfaces\Config\Module.
Definition at line 74 of file Module.php.
References Erebot\Config\Module\$active.