1
0
mirror of synced 2025-01-19 06:51:40 +03:00

fixed versionable template to adhere to generic plugin structure

This commit is contained in:
zYne 2007-10-18 19:13:30 +00:00
parent ea5e58fece
commit a6d05624f5
2 changed files with 6 additions and 10 deletions

View File

@ -39,8 +39,6 @@ class Doctrine_AuditLog extends Doctrine_Plugin
'pluginTable' => false,
);
protected $_auditTable;
public function __construct($options)
{
$this->_options = array_merge($this->_options, $options);

View File

@ -31,21 +31,19 @@
*/
class Doctrine_Template_Versionable extends Doctrine_Template
{
protected $_auditLog;
public function __construct(array $options)
{
$this->_auditLog = new Doctrine_AuditLog($options);
$this->_plugin = new Doctrine_AuditLog($options);
}
public function setUp()
{
$this->_auditLog->setOption('table', $this->_table);
$this->_auditLog->buildDefinition($this->_table);
$this->_plugin->setOption('table', $this->_table);
$this->_plugin->buildDefinition($this->_table);
$this->addListener(new Doctrine_AuditLog_Listener($this->_auditLog));
$this->addListener(new Doctrine_AuditLog_Listener($this->_plugin));
}
public function getAuditLog()
{
return $this->_auditLog;
return $this->_plugin;
}
}
}