|
@@ 40-48 (lines=9) @@
|
| 37 |
|
/** |
| 38 |
|
* {@inheritdoc} |
| 39 |
|
*/ |
| 40 |
|
public function find($identifier, $locale = null, array $options = []) |
| 41 |
|
{ |
| 42 |
|
$options = $this->getOptionsResolver(Events::FIND)->resolve($options); |
| 43 |
|
|
| 44 |
|
$event = new Event\FindEvent($identifier, $locale, $options); |
| 45 |
|
$this->eventDispatcher->dispatch(Events::FIND, $event); |
| 46 |
|
|
| 47 |
|
return $event->getDocument(); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
/** |
| 51 |
|
* {@inheritdoc} |
|
@@ 64-70 (lines=7) @@
|
| 61 |
|
/** |
| 62 |
|
* {@inheritdoc} |
| 63 |
|
*/ |
| 64 |
|
public function persist($document, $locale = null, array $options = []) |
| 65 |
|
{ |
| 66 |
|
$options = $this->getOptionsResolver(Events::FIND)->resolve($options); |
| 67 |
|
|
| 68 |
|
$event = new Event\PersistEvent($document, $locale, $options); |
| 69 |
|
$this->eventDispatcher->dispatch(Events::PERSIST, $event); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
/** |
| 73 |
|
* {@inheritdoc} |