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

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.
 

Detailed Description

Connection factory.

Definition at line 27 of file ConnectionFactory.php.

Constructor & Destructor Documentation

Erebot\ConnectionFactory::__construct (   $connectionCls,
  $eventClasses 
)

Initializes the factory.

Parameters
string$connectionClsThe name of the class to use to create new connections.
array$eventClassesAn 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.

Member Function Documentation

Erebot\ConnectionFactory::newConnection (   $bot,
  $config 
)

Create a new connection.

Parameters
Erebot::Interfaces::Core$botAn instance of the bot.
Erebot::Interfaces::Config::Server$configAn instance of a server configuration.
Return values
Erebot::Interfaces::ConnectionThe new connection.

Implements Erebot\Interfaces\ConnectionFactory.

Definition at line 52 of file ConnectionFactory.php.


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