本文整理匯總了PHP中Doctrine_Table::getTemplates方法的典型用法代碼示例。如果您正苦於以下問題:PHP Doctrine_Table::getTemplates方法的具體用法?PHP Doctrine_Table::getTemplates怎麽用?PHP Doctrine_Table::getTemplates使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Doctrine_Table
的用法示例。
在下文中一共展示了Doctrine_Table::getTemplates方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: generateClassFromTable
public function generateClassFromTable(Doctrine_Table $table)
{
$definition = array();
$definition['columns'] = $table->getColumns();
$definition['tableName'] = $table->getTableName();
$definition['actAs'] = $table->getTemplates();
$definition['generate_once'] = true;
$generatedclass = $this->generateClass($definition);
Doctrine::loadModels(sfConfig::get('sf_lib_dir') . '/model/doctrine/opCommunityTopicPlugin/base/');
return $generatedclass;
}
開發者ID:niryuu,項目名稱:opCommunityTopicPlugin-100628,代碼行數:11,代碼來源:opCommunityTopicPluginImagesRecordGenerator.class.php
示例2: generateClassFromTable
/**
* Generate a Doctrine_Record from a populated Doctrine_Table instance
*
* @param Doctrine_Table $table
* @return void
*/
public function generateClassFromTable(Doctrine_Table $table)
{
$definition = array();
$definition['columns'] = $table->getColumns();
$definition['tableName'] = $table->getTableName();
$definition['actAs'] = $table->getTemplates();
return $this->generateClass($definition);
}
示例3: _hasI18nTemplate
/**
* Checks, whether a table has a Doctrine_Template_I18n-based template.
*
* @author Jakub Argasiński <argasek@gmail.com>
* @param Doctrine_Table $table
*/
protected function _hasI18nTemplate(Doctrine_Table $table) {
if ($table->hasTemplate('Doctrine_Template_I18n')) {
return true;
}
$templates = $table->getTemplates();
foreach ($templates as $template) {
if (is_subclass_of($template, 'Doctrine_Template_I18n')) {
return true;
}
}
return false;
}