$client
$client : \Phergie\Irc\Client\React\Client
IRC client in use by the bot
Class for an IRC bot that reads in configuration files, connects to IRC servers, and configures plugins to receive events of interest from those servers.
$client : \Phergie\Irc\Client\React\Client
IRC client in use by the bot
$logger : \Psr\Log\LoggerInterface
Logger in use by the bot, defaults to logger in use by the IRC client
$parser : \Phergie\Irc\ParserInterface
Parser for converting generated IRC commands into event objects
$converter : \Phergie\Irc\Event\ParserConverter
Converter for event data from the IRC client's underlying parser
$queue : \Phergie\Irc\Bot\React\EventQueue
Queue for events generated by plugins to be sent to servers
setClient(\Phergie\Irc\Client\React\ClientInterface $client)
Sets the IRC client for the bot to use.
\Phergie\Irc\Client\React\ClientInterface | $client |
getClient() : \Phergie\Irc\Client\React\ClientInterface
Returns the IRC client in use by the bot.
setLogger(\Psr\Log\LoggerInterface $logger)
Sets the logger in use by the bot.
\Psr\Log\LoggerInterface | $logger |
getLogger() : \Psr\Log\LoggerInterface
Returns the logger in use by the bot.
setParser(\Phergie\Irc\ParserInterface $parser)
Sets the parser for generated event data in use by the bot.
\Phergie\Irc\ParserInterface | $parser |
getParser() : \Phergie\Irc\ParserInterface
Returns the parser for generated event data in use by the bot.
setConverter(\Phergie\Irc\Event\ParserConverterInterface $converter)
Sets the parser converter for event data in use by the bot.
\Phergie\Irc\Event\ParserConverterInterface | $converter |
getConverter() : \Phergie\Irc\Event\ParserConverterInterface
Returns the parser converter for event data in use by the bot.
setEventQueue(\Phergie\Irc\Bot\React\EventQueueInterface $queue)
Sets the event queue for the bot to use.
\Phergie\Irc\Bot\React\EventQueueInterface | $queue |
getEventQueue() : \Phergie\Irc\Bot\React\EventQueueInterface
Returns the event queue in use by the bot.
processClientEvent(string $event, array $message, \Phergie\Irc\ConnectionInterface $connection, \Phergie\Irc\Client\React\WriteStream $write)
Callback to process client events. Not intended to be called from outside this class.
string | $event | Received client event |
array | $message | Parsed message |
\Phergie\Irc\ConnectionInterface | $connection | Connection on which
|
\Phergie\Irc\Client\React\WriteStream | $write | Stream used to send
|
processOutgoingEvents(\Phergie\Irc\ConnectionInterface $connection, \Phergie\Irc\Client\React\WriteStream $write)
Callback to process any queued outgoing events. Not intended to be called from outside thie class.
\Phergie\Irc\ConnectionInterface | $connection | Connection on which
|
\Phergie\Irc\Client\React\WriteStream | $write | Stream used to send
|
validatePluginEvents(\Phergie\Irc\Bot\React\PluginInterface $plugin)
Validates a plugin's event callbacks.
\Phergie\Irc\Bot\React\PluginInterface | $plugin |
if any event callback is invalid
registerClientSubscribers(\Phergie\Irc\Client\React\Client $client)
Configures the client to emit events for specific types of messages.
\Phergie\Irc\Client\React\Client | $client | Client for which to
|
getEventSubtype(\Phergie\Irc\Event\EventInterface $event) : string
Returns an event subtype corresponding to a given event object, used to generate event names when emitting events.
\Phergie\Irc\Event\EventInterface | $event |