|
@@ 69-71 (lines=3) @@
|
| 66 |
|
$this->handler = $handler; |
| 67 |
|
$this->options = $options + self::DEFAULT_OPTIONS; |
| 68 |
|
|
| 69 |
|
if (isset($this->options[Options::CACHE]) && $this->options[Options::CACHE] instanceof CacheInterface) { |
| 70 |
|
$this->cache = $this->options[Options::CACHE]; |
| 71 |
|
} |
| 72 |
|
|
| 73 |
|
$this->hydrator = $this->determineHydrator(); |
| 74 |
|
} |
|
@@ 82-84 (lines=3) @@
|
| 79 |
|
*/ |
| 80 |
|
protected function determineHydrator(): Hydrator |
| 81 |
|
{ |
| 82 |
|
if (isset($this->options[Options::HYDRATOR]) && $this->options[Options::HYDRATOR] instanceof Hydrator) { |
| 83 |
|
return $this->options[Options::HYDRATOR]; |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
if (!isset($this->options[Options::HYDRATOR_OPTIONS])) { |
| 87 |
|
throw new \Exception('Missing Hydrator options'); |