�PNG  IHDR��;���IDATx��ܻn�0���K�� �)(�pA��� ���7�LeG{�� �§㻢|��ذaÆ 6lذaÆ 6lذaÆ 6lom��$^�y���ذag�5bÆ 6lذaÆ 6lذa{���� 6lذaÆ �`����}H�Fkm�,�m����Ӫ���ô�ô!� �x�|'ܢ˟;�E:���9�&ᶒ�}�{�v]�n&�6� �h��_��t�ڠ͵-ҫ���Z;��Z$�.�P���k�ž)�!��o���>}l�eQfJ�T��u і���چ��\��X=8��Rن4`Vw�l�>����n�G�^��i�s��"ms�$�u��i��?w�bs[m�6�K4���O���.�4��%����/����b�C%��t ��M�ז� �-l�G6�mrz2���s�%�9��s@���-�k�9�=���)������k�B5����\��+͂�Zsٲ ��Rn��~G���R���C����� �wIcI��n7jJ���hۛNCS|���j0��8y�iHKֶۛ�k�Ɉ+;Sz������L/��F�*\��Ԕ�#"5��m�2��[S��������=�g��n�a�P�e�ғ�L�� lذaÆ 6l�^k��̱aÆ 6lذaÆ 6lذa;���� �_��ذaÆ 6lذaÆ 6lذaÆ ���R���IEND�B` >|null */ private $data; /** * @param string $cacheKey * @param string $realKey * @param int $lifetime */ public function __construct(Result $result, Cache $cache, $cacheKey, $realKey, $lifetime) { $this->result = $result; $this->cache = $cache; $this->cacheKey = $cacheKey; $this->realKey = $realKey; $this->lifetime = $lifetime; } /** * {@inheritdoc} */ public function fetchNumeric() { $row = $this->fetch(); if ($row === false) { return false; } return array_values($row); } /** * {@inheritdoc} */ public function fetchAssociative() { return $this->fetch(); } /** * {@inheritdoc} */ public function fetchOne() { return FetchUtils::fetchOne($this); } /** * {@inheritdoc} */ public function fetchAllNumeric(): array { return array_map('array_values', $this->fetchAllAssociative()); } /** * {@inheritdoc} */ public function fetchAllAssociative(): array { $data = $this->result->fetchAllAssociative(); $this->store($data); return $data; } /** * {@inheritdoc} */ public function fetchFirstColumn(): array { return FetchUtils::fetchFirstColumn($this); } public function rowCount(): int { return $this->result->rowCount(); } public function columnCount(): int { return $this->result->columnCount(); } public function free(): void { $this->data = null; } /** * @return array|false * * @throws Exception */ private function fetch() { if ($this->data === null) { $this->data = []; } $row = $this->result->fetchAssociative(); if ($row !== false) { $this->data[] = $row; return $row; } $this->saveToCache(); return false; } /** * @param array> $data */ private function store(array $data): void { $this->data = $data; $this->saveToCache(); } private function saveToCache(): void { if ($this->data === null) { return; } $data = $this->cache->fetch($this->cacheKey); if ($data === false) { $data = []; } $data[$this->realKey] = $this->data; $this->cache->save($this->cacheKey, $data, $this->lifetime); } }