. */ /** * Doctrine_Template_I18n * * @package Doctrine * @subpackage Template * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision$ * @author Konsta Vesterinen */ class Doctrine_Template_I18n extends Doctrine_Template { /** * __construct * * @param string $array * @return void */ public function __construct(array $options = array()) { $this->_plugin = new Doctrine_I18n($options); } /** * setUp * * @return void */ public function setUp() { $name = $this->_table->getComponentName(); $this->_plugin->buildPluginDefinition($this->_table); $className = $this->_plugin->getOption('className'); $id = $this->_table->getIdentifier(); $this->hasMany($className . ' as Translation', array('local' => $id, 'foreign' => $id)); } /** * getI18n * * @return void */ public function getI18n() { return $this->_plugin; } }