示例#1
0
 /**
  * Add a new table object to the database.
  *
  * @param      TableMap $table The table to add
  */
 public function addTableObject(TableMap $table)
 {
     $table->setDatabaseMap($this);
     $this->tables[$table->getName()] = $table;
     $this->tablesByPhpName[$table->getPhpName()] = $table;
 }
示例#2
0
 protected function getI18nTableName(\TableMap $tableMap)
 {
     $behaviors = $tableMap->getBehaviors();
     if (!array_key_exists('i18n', $behaviors)) {
         return null;
     }
     return str_replace('%PHPNAME%', $tableMap->getPhpName(), $behaviors['i18n']['i18n_phpname']);
 }