/** * Constructor. */ public function __construct(GlueDB_Table $table, $dbcolumn, $dbtype, $dbnullable, $dbmaxlength, $dbprecision, $dbscale, $dbdefault, $dbauto) { // Init properties : $this->table = $table; $this->dbcolumn = $dbcolumn; $this->dbtype = $dbtype; $this->dbnullable = $dbnullable; $this->dbmaxlength = $dbmaxlength; $this->dbprecision = $dbprecision; $this->dbscale = $dbscale; $this->dbdefault = $dbdefault; $this->dbauto = $dbauto; // Get from table object (because there the method can be redefined) : $this->formatter = $table->get_column_formatter($this); $this->name = $table->get_column_alias($this); }
/** * Returns the virtual table identified by $table_name. * * Subsequent calls to this function with the same parameter will return the same * virtual table instance, instead of creating a new one. * * @param string $table_name * * @return GlueDB_Table */ public static function table($table_name) { return GlueDB_Table::get($table_name); }