. */ #namespace Doctrine::ORM::Events; /** * Doctrine_Event * * @author Konsta Vesterinen * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @package Doctrine * @subpackage Event * @link www.phpdoctrine.org * @since 2.0 * @version $Revision$ */ class Doctrine_Event { /* Event callback constants */ const preDelete = 'preDelete'; const postDelete = 'postDelete'; //...more protected $_type; protected $_target; protected $_defaultPrevented; public function __construct($type, $target = null) { $this->_type = $type; $this->_target = $target; $this->_defaultPrevented = false; } public function getType() { return $this->_type; } public function preventDefault() { $this->_defaultPrevented = true; } public function getDefaultPrevented() { return $this->_defaultPrevented; } public function getTarget() { return $this->_target; } }