@@ 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 | ||
@@ 78-80 (lines=3) @@ | ||
75 | */ |
|
76 | protected function determineHydrator(): Hydrator |
|
77 | { |
|
78 | if (isset($this->options[Options::HYDRATOR]) && $this->options[Options::HYDRATOR] instanceof Hydrator) { |
|
79 | return $this->options[Options::HYDRATOR]; |
|
80 | } |
|
81 | ||
82 | return Factory::create($this->options[Options::HYDRATOR] ?? []); |
|
83 | } |