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

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

        $db = null;
        foreach ($this->databases as $database) {
            if ($database->getName() === $name) {
                $db = $database;
                break;
            }
        }

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

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

        $db = null;
        foreach ($this->databases as $database) {
            if ($database->getName() === $name) {
                $db = $database;
                break;
            }
        }

        return $db;
    }
public function getDatabase ( $ name = null , $ doFinalInitialization = true ) { // this is temporary until we'll have a clean solution // for packaging datamodels/requiring schemas if ( $ doFinalInitialization ) { $ this -> doFinalInitialization ( ) ; } if ( null === $ name ) { return $ this -> databases [ 0 ] ; } $ db = null ; foreach ( $ this -> databases as $ database ) { if ( $ database -> getName ( ) === $ name ) { $ db = $ database ; break ; } } return $ db ; }
Returns the database according to the specified name.

@param  string   $name
@param  boolean  $doFinalInitialization
@return Database
Returns the database according to the specified name .