1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/tests_old/models/RecordHookTest.php

47 lines
1007 B
PHP

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