1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/tests_old/models/RecordHookTest.php

47 lines
1007 B
PHP
Raw Normal View History

<?php
class RecordHookTest extends Doctrine_Entity
{
protected $_messages = array();
public static function initMetadata($class)
{
$class->setColumn('name', 'string', null, array('primary' => true));
}
2008-03-17 16:26:34 +03:00
public function preSave()
{
$this->_messages[] = __FUNCTION__;
}
2008-03-17 16:26:34 +03:00
public function postSave()
{
$this->_messages[] = __FUNCTION__;
}
2008-03-17 16:26:34 +03:00
public function preInsert()
{
$this->_messages[] = __FUNCTION__;
}
2008-03-17 16:26:34 +03:00
public function postInsert()
{
$this->_messages[] = __FUNCTION__;
}
2008-03-17 16:26:34 +03:00
public function preUpdate()
{
$this->_messages[] = __FUNCTION__;
}
2008-03-17 16:26:34 +03:00
public function postUpdate()
{
$this->_messages[] = __FUNCTION__;
}
2008-03-17 16:26:34 +03:00
public function preDelete()
{
$this->_messages[] = __FUNCTION__;
}
2008-03-17 16:26:34 +03:00
public function postDelete()
{
$this->_messages[] = __FUNCTION__;
}
public function pop()
{
return array_pop($this->_messages);
}
}