gyro/modules/systemupdate/model/classes/systemupdates.model.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Table for systemupdate version control 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup SystemUpdate 00007 */ 00008 class DAOSystemupdates extends DataObjectBase { 00009 public $component; 00010 public $version; 00011 00012 public $connection = DB::DEFAULT_CONNECTION; 00013 00014 /** 00015 * Return table definition 00016 * 00017 * @return IDBTable 00018 */ 00019 public function create_table_object() { 00020 return new DBTable( 00021 'systemupdates', 00022 array( 00023 new DBFieldText('component', 50, null, DBFieldText::NOT_NULL), 00024 new DBFieldInt('version', null, DBFieldInt::UNSIGNED | DBFieldInt::NOT_NULL) 00025 ), 00026 'component' 00027 ); 00028 } 00029 00030 /** 00031 * Returns DB driver fro this table 00032 * 00033 * @return IDBDriver 00034 */ 00035 public function get_table_driver() { 00036 return DB::get_connection($this->connection); 00037 } 00038 00039 /** 00040 * Returns name of table, but escaped 00041 * 00042 * @return string 00043 */ 00044 public function get_table_name_escaped() { 00045 return $this->get_table_driver()->escape_database_entity($this->get_table_name(), IDBDriver::TABLE); 00046 } 00047 }