public function getDatabase($name = null, $doFinalInit = true)
    {
        // this is temporary until we'll have a clean solution
        // for packaging datamodels/requiring schemas
        if ($doFinalInit) {
            $this->doFinalInitialization();
        }

        if ($name === null) {
            return $this->dbList[0];
        }

        for ($i = 0, $size = count($this->dbList); $i < $size; $i++) {
            $db = $this->dbList[$i];
            if ($db->getName() === $name) {
                return $db;
            }
        }

        return null;
    }
public function getDatabase($name = null, $doFinalInit = true)
    {
        // this is temporary until we'll have a clean solution
        // for packaging datamodels/requiring schemas
        if ($doFinalInit) {
            $this->doFinalInitialization();
        }

        if ($name === null) {
            return $this->dbList[0];
        }

        for ($i = 0, $size = count($this->dbList); $i < $size; $i++) {
            $db = $this->dbList[$i];
            if ($db->getName() === $name) {
                return $db;
            }
        }

        return null;
    }
public function getDatabase ( $ name = null , $ doFinalInit = true ) { // this is temporary until we'll have a clean solution // for packaging datamodels/requiring schemas if ( $ doFinalInit ) { $ this -> doFinalInitialization ( ) ; } if ( $ name === null ) { return $ this -> dbList [ 0 ] ; } for ( $ i = 0 , $ size = count ( $ this -> dbList ) ; $ i < $ size ; $ i ++ ) { $ db = $ this -> dbList [ $ i ] ; if ( $ db -> getName ( ) === $ name ) { return $ db ; } } return null ; }
Return the database with the specified name.

@param string $name        database name
@param bool   $doFinalInit

@return Database|null
Return the database with the specified name .