@@ 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)) { |
|
@@ 471-473 (lines=3) @@ | ||
468 | if ( ! empty($metadata->lifecycleCallbacks[Events::postLoad])) { |
|
469 | $metadata->invokeLifecycleCallbacks(Events::postLoad, $document); |
|
470 | } |
|
471 | if ($this->evm->hasListeners(Events::postLoad)) { |
|
472 | $this->evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($document, $this->dm)); |
|
473 | } |
|
474 | ||
475 | return $data; |
|
476 | } |
@@ 1042-1044 (lines=3) @@ | ||
1039 | if ( ! empty($class->lifecycleCallbacks[Events::prePersist])) { |
|
1040 | $class->invokeLifecycleCallbacks(Events::prePersist, $document); |
|
1041 | } |
|
1042 | if ($this->evm->hasListeners(Events::prePersist)) { |
|
1043 | $this->evm->dispatchEvent(Events::prePersist, new LifecycleEventArgs($document, $this->dm)); |
|
1044 | } |
|
1045 | ||
1046 | $upsert = false; |
|
1047 | if ($class->identifier) { |
|
@@ 1934-1936 (lines=3) @@ | ||
1931 | if ( ! empty($class->lifecycleCallbacks[Events::preRemove])) { |
|
1932 | $class->invokeLifecycleCallbacks(Events::preRemove, $document); |
|
1933 | } |
|
1934 | if ($this->evm->hasListeners(Events::preRemove)) { |
|
1935 | $this->evm->dispatchEvent(Events::preRemove, new LifecycleEventArgs($document, $this->dm)); |
|
1936 | } |
|
1937 | $this->scheduleForDelete($document); |
|
1938 | break; |
|
1939 | case self::STATE_DETACHED: |
|
@@ 2504-2506 (lines=3) @@ | ||
2501 | } |
|
2502 | } |
|
2503 | ||
2504 | if ($this->evm->hasListeners(Events::onClear)) { |
|
2505 | $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->dm, $documentName)); |
|
2506 | } |
|
2507 | } |
|
2508 | ||
2509 | /** |