| @@ 435-437 (lines=3) @@ | ||
| 432 | $args = array(new PreLoadEventArgs($document, $this->dm, $data)); |
|
| 433 | $metadata->invokeLifecycleCallbacks(Events::preLoad, $document, $args); |
|
| 434 | } |
|
| 435 | if ($this->evm->hasListeners(Events::preLoad)) { |
|
| 436 | $this->evm->dispatchEvent(Events::preLoad, new PreLoadEventArgs($document, $this->dm, $data)); |
|
| 437 | } |
|
| 438 | ||
| 439 | // alsoLoadMethods may transform the document before hydration |
|
| 440 | if ( ! empty($metadata->alsoLoadMethods)) { |
|
| @@ 461-463 (lines=3) @@ | ||
| 458 | if ( ! empty($metadata->lifecycleCallbacks[Events::postLoad])) { |
|
| 459 | $metadata->invokeLifecycleCallbacks(Events::postLoad, $document, array(new LifecycleEventArgs($document, $this->dm))); |
|
| 460 | } |
|
| 461 | if ($this->evm->hasListeners(Events::postLoad)) { |
|
| 462 | $this->evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($document, $this->dm)); |
|
| 463 | } |
|
| 464 | ||
| 465 | return $data; |
|
| 466 | } |
|
| @@ 181-184 (lines=4) @@ | ||
| 178 | ||
| 179 | $class->setParentClasses($nonSuperclassParents); |
|
| 180 | ||
| 181 | if ($this->evm->hasListeners(Events::loadClassMetadata)) { |
|
| 182 | $eventArgs = new \Doctrine\ODM\MongoDB\Event\LoadClassMetadataEventArgs($class, $this->dm); |
|
| 183 | $this->evm->dispatchEvent(Events::loadClassMetadata, $eventArgs); |
|
| 184 | } |
|
| 185 | } |
|
| 186 | ||
| 187 | /** |
|
| @@ 2314-2316 (lines=3) @@ | ||
| 2311 | } |
|
| 2312 | } |
|
| 2313 | ||
| 2314 | if ($this->evm->hasListeners(Events::onClear)) { |
|
| 2315 | $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->dm, $documentName)); |
|
| 2316 | } |
|
| 2317 | } |
|
| 2318 | ||
| 2319 | /** |
|