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