@@ 183-186 (lines=4) @@ | ||
180 | ||
181 | $class->setParentClasses($nonSuperclassParents); |
|
182 | ||
183 | if ($this->evm->hasListeners(Events::loadClassMetadata)) { |
|
184 | $eventArgs = new \Doctrine\ODM\MongoDB\Event\LoadClassMetadataEventArgs($class, $this->dm); |
|
185 | $this->evm->dispatchEvent(Events::loadClassMetadata, $eventArgs); |
|
186 | } |
|
187 | } |
|
188 | ||
189 | /** |
@@ 1051-1053 (lines=3) @@ | ||
1048 | if ( ! empty($class->lifecycleCallbacks[Events::prePersist])) { |
|
1049 | $class->invokeLifecycleCallbacks(Events::prePersist, $document); |
|
1050 | } |
|
1051 | if ($this->evm->hasListeners(Events::prePersist)) { |
|
1052 | $this->evm->dispatchEvent(Events::prePersist, new LifecycleEventArgs($document, $this->dm)); |
|
1053 | } |
|
1054 | ||
1055 | $upsert = false; |
|
1056 | if ($class->identifier) { |
|
@@ 1943-1945 (lines=3) @@ | ||
1940 | if ( ! empty($class->lifecycleCallbacks[Events::preRemove])) { |
|
1941 | $class->invokeLifecycleCallbacks(Events::preRemove, $document); |
|
1942 | } |
|
1943 | if ($this->evm->hasListeners(Events::preRemove)) { |
|
1944 | $this->evm->dispatchEvent(Events::preRemove, new LifecycleEventArgs($document, $this->dm)); |
|
1945 | } |
|
1946 | $this->scheduleForDelete($document); |
|
1947 | break; |
|
1948 | case self::STATE_DETACHED: |
|
@@ 2514-2516 (lines=3) @@ | ||
2511 | } |
|
2512 | } |
|
2513 | ||
2514 | if ($this->evm->hasListeners(Events::onClear)) { |
|
2515 | $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->dm, $documentName)); |
|
2516 | } |
|
2517 | } |
|
2518 | ||
2519 | /** |
@@ 440-442 (lines=3) @@ | ||
437 | $args = array(&$data); |
|
438 | $metadata->invokeLifecycleCallbacks(Events::preLoad, $document, $args); |
|
439 | } |
|
440 | if ($this->evm->hasListeners(Events::preLoad)) { |
|
441 | $this->evm->dispatchEvent(Events::preLoad, new PreLoadEventArgs($document, $this->dm, $data)); |
|
442 | } |
|
443 | ||
444 | // alsoLoadMethods may transform the document before hydration |
|
445 | if ( ! empty($metadata->alsoLoadMethods)) { |
|
@@ 475-477 (lines=3) @@ | ||
472 | if ( ! empty($metadata->lifecycleCallbacks[Events::postLoad])) { |
|
473 | $metadata->invokeLifecycleCallbacks(Events::postLoad, $document); |
|
474 | } |
|
475 | if ($this->evm->hasListeners(Events::postLoad)) { |
|
476 | $this->evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($document, $this->dm)); |
|
477 | } |
|
478 | ||
479 | return $data; |
|
480 | } |