diff options
Diffstat (limited to 'src/model/entities/Article.php')
| -rw-r--r-- | src/model/entities/Article.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/model/entities/Article.php b/src/model/entities/Article.php index 3b846da..601e573 100644 --- a/src/model/entities/Article.php +++ b/src/model/entities/Article.php | |||
| @@ -49,6 +49,10 @@ class Article | |||
| 49 | { | 49 | { |
| 50 | return $this->date_time; | 50 | return $this->date_time; |
| 51 | } | 51 | } |
| 52 | public function setDateTime(\DateTime $date_time): void | ||
| 53 | { | ||
| 54 | $this->date_time = $date_time; | ||
| 55 | } | ||
| 52 | public function getTimestamp(): int | 56 | public function getTimestamp(): int |
| 53 | { | 57 | { |
| 54 | return $this->date_time->getTimestamp(); | 58 | return $this->date_time->getTimestamp(); |
| @@ -57,10 +61,18 @@ class Article | |||
| 57 | { | 61 | { |
| 58 | return $this->title; | 62 | return $this->title; |
| 59 | } | 63 | } |
| 64 | public function setTitle(string $title): void | ||
| 65 | { | ||
| 66 | $this->title = $title; | ||
| 67 | } | ||
| 60 | public function getPreview(): string | 68 | public function getPreview(): string |
| 61 | { | 69 | { |
| 62 | return $this->preview; | 70 | return $this->preview; |
| 63 | } | 71 | } |
| 72 | public function setPreview(string $preview): void | ||
| 73 | { | ||
| 74 | $this->preview = $preview; | ||
| 75 | } | ||
| 64 | public function getContent(): string | 76 | public function getContent(): string |
| 65 | { | 77 | { |
| 66 | return $this->content; | 78 | return $this->content; |
