public function set(DB $db, $name = null)
    {
        if ($name === null) {
            $name = $this->mainname;
        }
        if (isset($this->dbs[$name])) {
            throw new StorageEngaged($name);
        }
        $this->dbs[$name] = $db;
    }
public function set(DB $db, $name = null)
    {
        if ($name === null) {
            $name = $this->mainname;
        }
        if (isset($this->dbs[$name])) {
            throw new StorageEngaged($name);
        }
        $this->dbs[$name] = $db;
    }
public function set ( DB $ db , $ name = null ) { if ( $ name === null ) { $ name = $ this -> mainname ; } if ( isset ( $ this -> dbs [ $ name ] ) ) { throw new StorageEngaged ( $ name ) ; } $ this -> dbs [ $ name ] = $ db ; }
Saves a database in the storage

@param \go\DB\DB $db
@param string $name [optional]
@throws \go\DB\Exceptions\StorageEngaged
this name is alreagy engaged
Saves a database in the storage