/** * Forwards call to given database. * * @param GlueDB_Database $db * @param integer $style * * @return string */ protected function compile(GlueDB_Database $db, $style) { // Forwards call to database : return $db->compile_builder_rowlist($this, $style); }
/** * Forwards call to given database. * * @param GlueDB_Database $db * @param integer $style * * @return string */ protected function compile(GlueDB_Database $db, $style) { // Forwards call to database : return $db->compile_column($this, $style); }
/** * Forwards call to given database. * * @param GlueDB_Database $db * @param integer $style * * @return string */ function compile(GlueDB_Database $db, $style) { // Forwards call to database : return $db->compile_aliased($this, $style); }
/** * Returns the database object identified by $db_name. * * Subsequent calls to this function with the same parameter will return the same database * instance, instead of creating a new one. * * @param string $db_name * * @return GlueDB_Database */ public static function db($db_name = GlueDB_Database::DEFAULTDB) { return GlueDB_Database::get($db_name); }
/** * Returns a new database instance. Throws class not found exception if * no class is defined for given database. * * @param string $name * * @return GlueDB_Database */ protected static function create($name) { // Class name : $class = 'GlueDB_Database_' . ucfirst($name); // Unlock constructor, create instance and relock constructor : self::$constuctor_locked = false; $instance = new $class($name); self::$constuctor_locked = true; return $instance; }