phergie/phergie-irc-client-react

View on GitHub
src/ClientInterface.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
 * Phergie (http://phergie.org)
 *
 * @link http://github.com/phergie/phergie-irc-client-react for the canonical source repository
 * @copyright Copyright (c) 2008-2014 Phergie Development Team (http://phergie.org)
 * @license http://phergie.org/license Simplified BSD License
 * @package Phergie\Irc\Client\React
 */

namespace Phergie\Irc\Client\React;

use Evenement\EventEmitterInterface;
use Phergie\Irc\ConnectionInterface;
use Psr\Log\LoggerInterface;

/**
 * Interface for an IRC client implementation.
 *
 * @category Phergie
 * @package Phergie\Irc\Client\React
 */
interface ClientInterface extends EventEmitterInterface
{
    /**
     * Initializes an IRC connection.
     *
     * @param \Phergie\Irc\ConnectionInterface $connection Metadata for connection to establish
     * @throws \Phergie\Irc\Client\React\Exception if unable to establish the connection
     */
    public function addConnection(ConnectionInterface $connection);

    /**
     * Executes the event loop, which continues running until no active
     * connections remain.
     *
     * @param \Phergie\Irc\ConnectionInterface|\Phergie\Irc\ConnectionInterface[] $connections
     */
    public function run($connections);
}