@@ 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 | /** |
@@ 436-438 (lines=3) @@ | ||
433 | $args = array(&$data); |
|
434 | $metadata->invokeLifecycleCallbacks(Events::preLoad, $document, $args); |
|
435 | } |
|
436 | if ($this->evm->hasListeners(Events::preLoad)) { |
|
437 | $this->evm->dispatchEvent(Events::preLoad, new PreLoadEventArgs($document, $this->dm, $data)); |
|
438 | } |
|
439 | ||
440 | // alsoLoadMethods may transform the document before hydration |
|
441 | if ( ! empty($metadata->alsoLoadMethods)) { |
|
@@ 462-464 (lines=3) @@ | ||
459 | if ( ! empty($metadata->lifecycleCallbacks[Events::postLoad])) { |
|
460 | $metadata->invokeLifecycleCallbacks(Events::postLoad, $document); |
|
461 | } |
|
462 | if ($this->evm->hasListeners(Events::postLoad)) { |
|
463 | $this->evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($document, $this->dm)); |
|
464 | } |
|
465 | ||
466 | return $data; |
|
467 | } |
@@ 1038-1040 (lines=3) @@ | ||
1035 | if ( ! empty($class->lifecycleCallbacks[Events::prePersist])) { |
|
1036 | $class->invokeLifecycleCallbacks(Events::prePersist, $document); |
|
1037 | } |
|
1038 | if ($this->evm->hasListeners(Events::prePersist)) { |
|
1039 | $this->evm->dispatchEvent(Events::prePersist, new LifecycleEventArgs($document, $this->dm)); |
|
1040 | } |
|
1041 | ||
1042 | $upsert = false; |
|
1043 | if ($class->identifier) { |
|
@@ 1930-1932 (lines=3) @@ | ||
1927 | if ( ! empty($class->lifecycleCallbacks[Events::preRemove])) { |
|
1928 | $class->invokeLifecycleCallbacks(Events::preRemove, $document); |
|
1929 | } |
|
1930 | if ($this->evm->hasListeners(Events::preRemove)) { |
|
1931 | $this->evm->dispatchEvent(Events::preRemove, new LifecycleEventArgs($document, $this->dm)); |
|
1932 | } |
|
1933 | $this->scheduleForDelete($document); |
|
1934 | break; |
|
1935 | case self::STATE_DETACHED: |
|
@@ 2500-2502 (lines=3) @@ | ||
2497 | } |
|
2498 | } |
|
2499 | ||
2500 | if ($this->evm->hasListeners(Events::onClear)) { |
|
2501 | $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->dm, $documentName)); |
|
2502 | } |
|
2503 | } |
|
2504 | ||
2505 | /** |