| @@ 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 | } |
|
| @@ 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 | /** |
|