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