lastChanged()). Rendering a "Last updated" * value on a page thus only works when it is output at the end (or as USER_INT which are calculated in the end). * Additionally, a plugin like the ext:seo pages sitemap (which only gives a list of pages but does not actually * render all pages) can only render a correct value after a page containing a "just changed" content element * has been FE rendered at least once to have the newest "SYS_LASTCHANGED" value in DB. */ private int $lastChanged = 0; /** * Becomes the HTTP Response header 'Content-Type'. * This is obviously Response and not Response body-stream related, but we currently "park" it here for * applications like Extbase that need to reset to something like application/json. * * @todo: This should be remodeled. This should be part of a construct that gathers page parts and * Response related details to finally compile a Response in the end. "Parking" that information * here is a temporary measure on the way to a better solution where for instance single * cObj return a data object instead of a string. */ private string $httpContentType = 'text/html; charset=utf-8'; /** * Registry of "not cached" elements, typically COA_INT, USER_INT and uncached extbase plugins. Each * entry contains state needed to render the element, most contain a placeholder name to be substituted * within the content (due to the current FE rendering structure), and the rendering definition of the * element. See the single consumers for details. */ private array $notCachedContentElementRegistry = []; /** * Data the final page title is generated from. */ private array $pageTitle = []; /** * Unique string for PageRenderer to substitute placeholders with final data. */ private string $pageRendererSubstitutionHash = ''; private bool $pageContentWasLoadedFromCache = false; private int $pageCacheGeneratedTimestamp; private ?int $pageCacheExpiresTimestamp = null; public function setContent(string $content): void { $this->content = $content; } public function getContent(): string { return $this->content; } public function setLastChanged(int $timestamp): void { $this->lastChanged = $timestamp; } public function getLastChanged(): int { return $this->lastChanged; } public function setHttpContentType(string $contentType): void { $this->httpContentType = $contentType; } public function getHttpContentType(): string { return $this->httpContentType; } public function addNotCachedContentElement(array $data): void { $this->notCachedContentElementRegistry[] = $data; } public function hasNotCachedContentElements(): bool { return !empty($this->notCachedContentElementRegistry); } public function getNotCachedContentElementRegistry(): array { return $this->notCachedContentElementRegistry; } public function setPageTitle(array $pageTitle): void { $this->pageTitle = $pageTitle; } public function getPageTitle(): array { return $this->pageTitle; } public function setPageRendererSubstitutionHash(string $hash): void { $this->pageRendererSubstitutionHash = $hash; } public function getPageRendererSubstitutionHash(): string { return $this->pageRendererSubstitutionHash; } public function setPageContentWasLoadedFromCache(): void { $this->pageContentWasLoadedFromCache = true; } public function hasPageContentBeenLoadedFromCache(): bool { return $this->pageContentWasLoadedFromCache; } public function setPageCacheGeneratedTimestamp(int $timestamp): void { $this->pageCacheGeneratedTimestamp = $timestamp; } public function getPageCacheGeneratedTimestamp(): int { return $this->pageCacheGeneratedTimestamp; } public function setPageCacheExpireTimestamp(int $timestamp): void { $this->pageCacheExpiresTimestamp = $timestamp; } public function getPageCacheExpireTimestamp(): ?int { return $this->pageCacheExpiresTimestamp; } }