cacheDataBySlots[$pageId])) { $this->cacheDataBySlots[$pageId] = []; } /** * Metadata and other rendering may occurs * recursively in one request * * We record only the first one because the second call one will use the first * one */ if (!isset($this->cacheDataBySlots[$pageId][$cacheParser->mode])) { $date = null; if(file_exists($cacheParser->cache)){ $date = Iso8601Date::createFromTimestamp(filemtime($cacheParser->cache))->getDateTime(); } $this->cacheDataBySlots[$pageId][$cacheParser->mode] = [ self::RESULT_STATUS => $result, self::DATE_MODIFIED => $date ]; } } public function getXhtmlRenderCacheSlotResults() { $xhtmlRenderResult = []; foreach ($this->cacheDataBySlots as $pageId => $modes) { foreach($modes as $mode => $values) { if ($mode === "xhtml") { $xhtmlRenderResult[$pageId] = $this->cacheDataBySlots[$pageId][$mode][self::RESULT_STATUS]; } } } return $xhtmlRenderResult; } public function getCacheSlotResults() { return $this->cacheDataBySlots; } public function isCacheLogPresent($pageId, $mode) { return isset($this->cacheDataBySlots[$pageId][$mode]); } }