プロジェクト

全般

プロフィール

Backport(バックポート) #3629 » changeset_ra5023eb9de8f076c9670da4cfeeef11cd341e186.diff

Kousuke Ebihara, 2012-09-11 22:10

差分を表示:

lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record/Generator.php
*/
abstract class Doctrine_Record_Generator extends Doctrine_Record_Abstract
{
protected static $initializedTables = array();
/**
* _options
*
......
$this->_options['tableName'] = str_replace('%TABLE%', $ownerTableName, $tableName);
}
// check that class doesn't exist (otherwise we cannot create it)
if ($this->_options['generateFiles'] === false && class_exists($this->_options['className'])) {
$this->_table = Doctrine_Core::getTable($this->_options['className']);
return false;
$currentTableHash = spl_object_hash($table);
if (!empty(self::$initializedTables[$currentTableHash])) {
return null;
}
self::$initializedTables[$currentTableHash] = true;
$this->buildTable();
$fk = $this->buildForeignKeys($this->_options['table']);
......
$this->setTableDefinition();
$this->setUp();
$this->generateClassFromTable($this->_table);
if ($this->_options['generateFiles'] === true || !class_exists($this->_options['className'])) {
$this->generateClassFromTable($this->_table);
}
$this->buildChildDefinitions();
......
eval($def);
}
}
}
}
(2-2/2)