aboutsummaryrefslogtreecommitdiff
path: root/app/class/Header.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-09 00:38:20 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-09 00:38:20 +0200
commit1270f3300998afbc5defab832e02cc831f486d9f (patch)
tree1710425ba321873785a7643f722332bb6bed5296 /app/class/Header.php
parente91dfdbc7549b60a6bc2decff885a26f7fbb365f (diff)
parentf718dc515b3d617e24578dfa875ae786e93f8295 (diff)
downloadwcms-1270f3300998afbc5defab832e02cc831f486d9f.tar.gz
wcms-1270f3300998afbc5defab832e02cc831f486d9f.zip
Merge branch 'master' of https://github.com/vincent-peugnet/wcms
Diffstat (limited to 'app/class/Header.php')
-rw-r--r--app/class/Header.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/class/Header.php b/app/class/Header.php
new file mode 100644
index 0000000..0165e59
--- /dev/null
+++ b/app/class/Header.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Wcms;
+
+/**
+ * Simple "c struct like" class that represent a Header's datas.
+ * All members are public because there is no logic in this class. It is only
+ * used to pass data from one element to another with cleanly typed members.
+ */
+class Header
+{
+ /** @var string $id the id of this header. */
+ public $id;
+ /** @var int $level the level of deepness of this header. */
+ public $level;
+ /** @var string $title the title displayed by this header. */
+ public $title;
+
+ public function __construct(string $id, int $level, string $title) {
+ $this->id = $id;
+ $this->level = $level;
+ $this->title = $title;
+ }
+}