public function create(array $params, $name = null)
    {
        if ($name === null) {
            $name = $this->mainname;
        }
        $db = DB::create($params);
        $this->set($db, $name);
        return $db;
    }
public function create(array $params, $name = null)
    {
        if ($name === null) {
            $name = $this->mainname;
        }
        $db = DB::create($params);
        $this->set($db, $name);
        return $db;
    }
public function create ( array $ params , $ name = null ) { if ( $ name === null ) { $ name = $ this -> mainname ; } $ db = DB :: create ( $ params ) ; $ this -> set ( $ db , $ name ) ; return $ db ; }
Creates a database instance and saves it in the storage

@param array $params
the connection parameters
@param string $name [optional]
the name in the storage (main by default)
@return \go\DB\DB
the database instance
@throws \go\DB\Exceptions\StorageEngaged
this name is alreagy engaged
@throws \go\DB\Exceptions\Config
@throws \go\DB\Exceptions\Connect
Creates a database instance and saves it in the storage