public function getConnection($connectionName = 'default')
    {
        if ($this->connections->containsKey($connectionName)) {
            return $this->connections->get($connectionName);
        }

        $configuration = $this->getConfiguration($connectionName);

        $this->connections->set($connectionName,
            $database = (new \OrientDB(
                $configuration->getHost(),
                $configuration->getPort(),
                $configuration->getTimeout()
            ))
        );
        $database->connect(
            $configuration->getUser(),
            $configuration->getPassword()
        );

        return $database;
    }
public function getConnection($connectionName = 'default')
    {
        if ($this->connections->containsKey($connectionName)) {
            return $this->connections->get($connectionName);
        }

        $configuration = $this->getConfiguration($connectionName);

        $this->connections->set($connectionName,
            $database = (new \OrientDB(
                $configuration->getHost(),
                $configuration->getPort(),
                $configuration->getTimeout()
            ))
        );
        $database->connect(
            $configuration->getUser(),
            $configuration->getPassword()
        );

        return $database;
    }
public function getConnection ( $ connectionName = 'default' ) { if ( $ this -> connections -> containsKey ( $ connectionName ) ) { return $ this -> connections -> get ( $ connectionName ) ; } $ configuration = $ this -> getConfiguration ( $ connectionName ) ; $ this -> connections -> set ( $ connectionName , $ database = ( new \ OrientDB ( $ configuration -> getHost ( ) , $ configuration -> getPort ( ) , $ configuration -> getTimeout ( ) ) ) ) ; $ database -> connect ( $ configuration -> getUser ( ) , $ configuration -> getPassword ( ) ) ; return $ database ; }
Return registered connection under given connectionName

@param string $connectionName

@return \OrientDB
Return registered connection under given connectionName