protected getErrorCallback ( Phergie\Irc\ConnectionInterface $connection ) : callable | ||
$connection | Phergie\Irc\ConnectionInterface | Connection on which the error occurred |
return | callable |
protected function getErrorCallback(ConnectionInterface $connection)
{
$logger = $this->getLogger();
return function ($exception) use($connection, $logger) {
$this->emit('connect.error', array($exception, $connection, $logger));
};
}