original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Return registered connection under given connectionName
  
  @param string $connectionName
  
  @return \OrientDB
docstring_tokens: Return registered connection under given connectionName