private function resolveDatabaseType($type)
    {
        foreach ($this->getDatabases() as $database) {
            if ($database->type === $type) {
                return $database;
            }
        }
        throw new \DomainException(sprintf('Unknown database type (%s). Please use mysqli, pgsql or mariadb.', $type));
    }
private function resolveDatabaseType($type)
    {
        foreach ($this->getDatabases() as $database) {
            if ($database->type === $type) {
                return $database;
            }
        }
        throw new \DomainException(sprintf('Unknown database type (%s). Please use mysqli, pgsql or mariadb.', $type));
    }
private function resolveDatabaseType ( $ type ) { foreach ( $ this -> getDatabases ( ) as $ database ) { if ( $ database -> type === $ type ) { return $ database ; } } throw new \ DomainException ( sprintf ( 'Unknown database type (%s). Please use mysqli, pgsql or mariadb.' , $ type ) ) ; }
Resolve database class.

@param string $type Database type

@return AbstractDatabase
Resolve database class .