|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
Connection factory. More...
Inheritance diagram for Erebot\ConnectionFactory:Public Member Functions | |
| __construct ($connectionCls, $eventClasses) | |
| newConnection ($bot, $config) | |
Protected Attributes | |
| $connectionCls | |
| Class to use to create connections. | |
| $eventClasses | |
| Mapping of event interfaces to their factory. | |
Connection factory.
Definition at line 27 of file ConnectionFactory.php.
| Erebot\ConnectionFactory::__construct | ( | $connectionCls, | |
| $eventClasses | |||
| ) |
Initializes the factory.
| string | $connectionCls | The name of the class to use to create new connections. |
| array | $eventClasses | An associative array which maps interface names to the class to use to create events with that interface. |
Definition at line 46 of file ConnectionFactory.php.
| Erebot\ConnectionFactory::newConnection | ( | $bot, | |
| $config | |||
| ) |
Create a new connection.
| Erebot::Interfaces::Core | $bot | An instance of the bot. |
| Erebot::Interfaces::Config::Server | $config | An instance of a server configuration. |
| Erebot::Interfaces::Connection | The new connection. |
Implements Erebot\Interfaces\ConnectionFactory.
Definition at line 52 of file ConnectionFactory.php.