diff --git a/lib/Doctrine/EventListener/AccessorInvoker.php b/lib/Doctrine/EventListener/AccessorInvoker.php deleted file mode 100644 index cc892e690..000000000 --- a/lib/Doctrine/EventListener/AccessorInvoker.php +++ /dev/null @@ -1,84 +0,0 @@ -. - */ -Doctrine::autoload('Doctrine_EventListener'); -/** - * Doctrine_EventListener_AccessorInvoker - * - * @author Konsta Vesterinen - * @package Doctrine - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @category Object Relational Mapping - * @link www.phpdoctrine.com - * @since 1.0 - * @version $Revision$ - */ -class Doctrine_EventListener_AccessorInvoker extends Doctrine_EventListener -{ - /** - * @var boolean $lockGetCall a simple variable to prevent recursion - */ - private $lockGetCall = false; - /** - * @var boolean $lockSetCall a simple variable to prevent recursion - */ - private $lockSetCall = false; - /** - * onGetProperty - * - * @param Doctrine_Record $record - * @param string $property - * @param mixed $value - * @return mixed - */ - public function onGetProperty(Doctrine_Record $record, $property, $value) - { - $method = 'get' . ucwords($property); - - if (method_exists($record, $method) && ! $this->lockGetCall) { - $this->lockGetCall = true; - - $value = $record->$method($value); - $this->lockGetCall = false; - return $value; - } - return $value; - } - /** - * onPreSetProperty - * - * @param Doctrine_Record $record - * @param string $property - * @param mixed $value - * @return mixed - */ - public function onSetProperty(Doctrine_Record $record, $property, $value) - { - $method = 'set' . ucwords($property); - - if (method_exists($record, $method) && ! $this->lockSetCall) { - $this->lockSetCall = true; - $value = $record->$method($value); - $this->lockSetCall = false; - return $value; - } - return $value; - } -}