Phergie\Irc\Bot\React\Bot::processClientEvent PHP Method

processClientEvent() public method

Callback to process client events. Not intended to be called from outside this class.
public processClientEvent ( string $event, array $message, Phergie\Irc\ConnectionInterface $connection, Phergie\Irc\Client\React\WriteStream $write )
$event string Received client event
$message array Parsed message
$connection Phergie\Irc\ConnectionInterface Connection on which the event occurred
$write Phergie\Irc\Client\React\WriteStream Stream used to send commands to the server
    public function processClientEvent($event, array $message, ConnectionInterface $connection, WriteStream $write)
    {
        $converter = $this->getConverter();
        $converted = $converter->convert($message);
        $converted->setConnection($connection);
        $client = $this->getClient();
        $queue = $this->getEventQueueFactory()->getEventQueue($connection);
        $params = [$converted, $queue];
        $subtype = $this->getEventSubtype($converted);
        $client->emit($event . '.each', $params);
        $client->emit($event . '.' . $subtype, $params);
        $this->processOutgoingEvents($connection, $write);
    }