Permalink
Browse files

Merge pull request #222 from docteurklein/lifecycle

make Base LifecycleEventArgs usable in orm and odm
  • Loading branch information...
2 parents b918371 + ff02da8 commit d514e3920656921ba1148f16a4089222c58bc83a @beberlei beberlei committed Dec 5, 2012
Showing with 17 additions and 6 deletions.
  1. +17 −6 lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php
@@ -41,28 +41,39 @@ class LifecycleEventArgs extends EventArgs
/**
* @var object
*/
- private $entity;
+ private $object;
/**
* Constructor
*
- * @param object $entity
+ * @param object $object
* @param ObjectManager $objectManager
*/
- public function __construct($entity, ObjectManager $objectManager)
+ public function __construct($object, ObjectManager $objectManager)
{
- $this->entity = $entity;
+ $this->object = $object;
$this->objectManager = $objectManager;
}
/**
- * Retrieve associated Entity.
+ * Retrieve associated entity.
+ * @deprecated
*
* @return object
*/
public function getEntity()
{
- return $this->entity;
+ return $this->object;
+ }
+
+ /**
+ * Retrieve associated object.
+ *
+ * @return object
+ */
+ public function getObject()
+ {
+ return $this->object;
}
/**

0 comments on commit d514e39

Please sign in to comment.