gyro/core/lib/interfaces/idbtable.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Interface for DB table 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Interfaces 00007 */ 00008 interface IDBTable { 00009 /** 00010 * Returns name of table 00011 * 00012 * @return string 00013 */ 00014 public function get_table_name(); 00015 00016 /** 00017 * Returns alias of table, if any 00018 * 00019 * @return string 00020 */ 00021 public function get_table_alias(); 00022 00023 /** 00024 * Returns name of table, but escaped 00025 * 00026 * @return string 00027 */ 00028 public function get_table_name_escaped(); 00029 00030 /** 00031 * Returns alias of table, if any - but escaped 00032 * 00033 * @return string 00034 */ 00035 public function get_table_alias_escaped(); 00036 00037 /** 00038 * Returns array of columns 00039 * 00040 * @return array Associative array with column name as key and IDBField instance as value 00041 */ 00042 public function get_table_fields(); 00043 00044 /** 00045 * Returns field fpr given column 00046 * 00047 * @param string $column Column name 00048 * @return IDBField Either field or false if no such field exists 00049 */ 00050 public function get_table_field($column); 00051 00052 /** 00053 * Returns array of keys 00054 * 00055 * @return array Associative array with column name as key and IDBField instance as value 00056 */ 00057 public function get_table_keys(); 00058 00059 /** 00060 * Returns array of relations 00061 * 00062 * @return array Array with IDBRelation instance as value 00063 */ 00064 public function get_table_relations(); 00065 00066 /** 00067 * Returns relations between two tables 00068 * 00069 * @param IDBTable $other 00070 * @return array Array of IDBRelations 00071 */ 00072 public function get_matching_relations(IDBTable $other); 00073 00074 /** 00075 * Returns array of constraints 00076 * 00077 * @return array Array with IDBConstraint instance as value 00078 */ 00079 public function get_table_constraints(); 00080 00081 /** 00082 * Returns DB driver fro this table 00083 * 00084 * @return IDBDriver 00085 */ 00086 public function get_table_driver(); 00087 }