コード例 #1
0
 /**
  * Returns instance of many-to-many table using relationship types between two tables
  *
  * @param string $ps_table1 A valid table name
  * @param string $ps_table2 A valid table name
  * @return BaseRelationshipModel An model instance for the table relating the specified tables 
  */
 public static function getRelationshipTypeInstance($ps_table1, $ps_table2)
 {
     $t_rel = new ca_relationship_types();
     if ($vs_table = $t_rel->getRelationshipTypeTable($ps_table1, $ps_table2)) {
         return $t_rel->getAppDatamodel()->getInstanceByTableName($vs_table);
     }
     return null;
 }