Phergie\Irc\Client\React\Client::getTickCallback PHP Method

getTickCallback() protected method

Returns a callback executed periodically to allow events to be sent asynchronously versus in response to received or sent events.
protected getTickCallback ( Phergie\Irc\Client\React\WriteStream $write, Phergie\Irc\ConnectionInterface $connection )
$write Phergie\Irc\Client\React\WriteStream Stream used to send events to the server
$connection Phergie\Irc\ConnectionInterface Connection to receive the event
    protected function getTickCallback(WriteStream $write, ConnectionInterface $connection)
    {
        $logger = $this->getLogger();
        return function () use($write, $connection, $logger) {
            $this->emit('irc.tick', array($write, $connection, $logger));
        };
    }