1 | <?php |
||
15 | class ApplicationRenderer |
||
16 | { |
||
17 | protected $storage; |
||
18 | protected $request; |
||
19 | protected $application; |
||
20 | const HEADER_POWERED_BY = 'Cloud Control - https://getcloudcontrol.org'; |
||
21 | |||
22 | /** |
||
23 | * ApplicationRenderer constructor. |
||
24 | * @param Application $application |
||
25 | * @param Storage $storage |
||
26 | * @param Request $request |
||
27 | */ |
||
28 | public function __construct(Application $application, Storage $storage, Request $request) |
||
34 | |||
35 | /** |
||
36 | * Loop through all application components and render them |
||
37 | * @param array $applicationComponents |
||
38 | */ |
||
39 | public function renderApplicationComponents($applicationComponents) |
||
45 | |||
46 | /** |
||
47 | * Loop through all (matched) sitemap components and render them |
||
48 | * @param array $matchedSitemapItems |
||
49 | * @throws \Exception |
||
50 | */ |
||
51 | public function renderSitemapComponents($matchedSitemapItems) |
||
60 | |||
61 | /** |
||
62 | * Set the default caching of pages |
||
63 | * @param string $intervalString |
||
64 | */ |
||
65 | public function setCachingHeaders($intervalString = CachableBaseComponent::DEFAULT_MAXAGE) |
||
76 | |||
77 | /** |
||
78 | * Set non caching |
||
79 | * @throws \Exception |
||
80 | */ |
||
81 | public function setNotCachingHeaders() |
||
88 | |||
89 | /** |
||
90 | * @param $sitemapItem |
||
91 | */ |
||
92 | private function renderSitemapComponent($sitemapItem) |
||
112 | } |