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