/** * 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; }
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']); }