public function createConnection(HostConfiguration $configuration)
    {
        if ($this->cache->offsetExists($configuration)) {
            return $this->cache->offsetGet($configuration);
        }
        $connection = new SocketConnection();
        $connection->setConfiguration($configuration);
        $connection->open();
        $this->cache->attach($configuration, $connection);
        return $connection;
    }
public function createConnection(HostConfiguration $configuration)
    {
        if ($this->cache->offsetExists($configuration)) {
            return $this->cache->offsetGet($configuration);
        }
        $connection = new SocketConnection();
        $connection->setConfiguration($configuration);
        $connection->open();
        $this->cache->attach($configuration, $connection);
        return $connection;
    }
public function createConnection ( HostConfiguration $ configuration ) { if ( $ this -> cache -> offsetExists ( $ configuration ) ) { return $ this -> cache -> offsetGet ( $ configuration ) ; } $ connection = new SocketConnection ( ) ; $ connection -> setConfiguration ( $ configuration ) ; $ connection -> open ( ) ; $ this -> cache -> attach ( $ configuration , $ connection ) ; return $ connection ; }
Create new connection
@param HostConfiguration $configuration Connection Configuration
@return SocketConnection
@throws ConnectionEstablishmentException
Create new connection