示例#1
0
 /**
  * Begin a query by specifying the table you want to access, by its Class name rather
  * than its table name. __CLASS__ is useful, so you can just copy-paste queries between
  * classes. The objects that are ultimately returned by this query are of this class.
  *
  * This is equivalent to the FROM part of a SQL query.
  */
 public function __construct($className)
 {
     global $GLOBAL_DATATABLES;
     $this->className = $className;
     $this->tableName = $GLOBAL_DATATABLES[$className];
     $this->table = DBTable::getTable($this->tableName);
 }
示例#2
0
 private function getDBTable()
 {
     global $GLOBAL_DATATABLES;
     return DBTable::getTable($GLOBAL_DATATABLES[get_class($this)]);
 }