diff options
author | Christian Cleberg <hello@cleberg.net> | 2023-06-14 22:08:34 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2023-06-14 22:08:34 -0500 |
commit | 49efb238b879bce764d04dad99c7a169e80f93dd (patch) | |
tree | 7b1d26dbe86710ee7830b3fe6ff82afff3712e2d /src/Controller/FeedController.php | |
parent | 53488151f29e3afbd1b1348597ff2123b97ad2d7 (diff) | |
download | hn-49efb238b879bce764d04dad99c7a169e80f93dd.tar.gz hn-49efb238b879bce764d04dad99c7a169e80f93dd.tar.bz2 hn-49efb238b879bce764d04dad99c7a169e80f93dd.zip |
massive overhaul to implement proper MVC
Diffstat (limited to 'src/Controller/FeedController.php')
-rw-r--r-- | src/Controller/FeedController.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/Controller/FeedController.php b/src/Controller/FeedController.php new file mode 100644 index 0000000..0e3e3b4 --- /dev/null +++ b/src/Controller/FeedController.php @@ -0,0 +1,47 @@ +<?php + +namespace HN\Controllers; + +class FeedController +{ + /** + * @var string + */ + private string $canonical_url; + /** + * @var string + */ + private string $description; + /** + * @var string + */ + private string $title; + /** + * @var string + */ + private string $content; + /** + * @var false|string + */ + private mixed $current_year; + + public function __construct(string $canonical_url, string $description, string $title, string $content) + { + $this->canonical_url = $canonical_url; + $this->description = $description; + $this->title = $title; + $this->content = $content; + $this->current_year = date("Y"); + } + + /** + * Request template to be presented to the user + * + * @access public + * @author cmc <hello@cleberg.net> + */ + public function render(): void + { + include_once 'src/View/BaseTemplate.php'; + } +} |