| 1 | <?php |
||
| 12 | abstract class AbstractContentType |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Id |
||
| 17 | * |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $id; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Title |
||
| 24 | * |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $title; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Content |
||
| 31 | * |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | private $content; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Date created |
||
| 38 | * |
||
| 39 | * @var \DateTime |
||
| 40 | */ |
||
| 41 | private $created; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Date updated |
||
| 45 | * |
||
| 46 | * @var \DateTime |
||
| 47 | */ |
||
| 48 | private $updated; |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Is draft |
||
| 52 | * |
||
| 53 | * @var boolean |
||
| 54 | */ |
||
| 55 | private $draft; |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Template |
||
| 59 | * |
||
| 60 | * @var string |
||
| 61 | */ |
||
| 62 | private $template; |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Constructor |
||
| 66 | * |
||
| 67 | * @param string $id |
||
| 68 | * @param string $title |
||
| 69 | * @param string $content |
||
| 70 | * @param \DateTime $created |
||
| 71 | * @param \DateTime $updated |
||
| 72 | * @param bool $draft |
||
| 73 | * @param string $template |
||
| 74 | */ |
||
| 75 | public function __construct(string $id, string $title, string $content, \DateTime $created, \DateTime $updated, |
||
| 86 | |||
| 87 | /** |
||
| 88 | * Get id |
||
| 89 | * |
||
| 90 | * @return string |
||
| 91 | */ |
||
| 92 | public function getId(): string |
||
| 96 | |||
| 97 | /** |
||
| 98 | * Get title |
||
| 99 | * |
||
| 100 | * @return string |
||
| 101 | */ |
||
| 102 | public function getTitle(): string |
||
| 106 | |||
| 107 | /** |
||
| 108 | * Get content |
||
| 109 | * |
||
| 110 | * @return string |
||
| 111 | */ |
||
| 112 | public function getContent(): string |
||
| 116 | |||
| 117 | /** |
||
| 118 | * Get date created |
||
| 119 | * |
||
| 120 | * @return \DateTime |
||
| 121 | */ |
||
| 122 | public function getCreated(): \DateTime |
||
| 126 | |||
| 127 | /** |
||
| 128 | * Get date updated |
||
| 129 | * |
||
| 130 | * @return \DateTime |
||
| 131 | */ |
||
| 132 | public function getUpdated(): \DateTime |
||
| 136 | |||
| 137 | /** |
||
| 138 | * Is draft |
||
| 139 | * |
||
| 140 | * @return boolean |
||
| 141 | */ |
||
| 142 | public function isDraft(): bool |
||
| 146 | |||
| 147 | /** |
||
| 148 | * Get template |
||
| 149 | * |
||
| 150 | * @return string |
||
| 151 | */ |
||
| 152 | public function getTemplate() : string |
||
| 156 | |||
| 157 | /** |
||
| 158 | * Get type |
||
| 159 | * |
||
| 160 | * @return string |
||
| 161 | */ |
||
| 162 | abstract public function getType() : string; |
||
| 163 | } |
||
| 164 | |||
| 165 |