aboutsummaryrefslogtreecommitdiff
path: root/app/class/Header.php
diff options
context:
space:
mode:
authorVincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com>2020-04-08 17:42:26 +0200
committerGitHub <noreply@github.com>2020-04-08 17:42:26 +0200
commitf718dc515b3d617e24578dfa875ae786e93f8295 (patch)
tree1f19a1c27a0eaa4f5908d0d8090f504eaad5cb11 /app/class/Header.php
parentc3e62c500b38104acaecc987621cfc03058729c0 (diff)
parentbfa7d5b2b22b2286faba00884925ff7ecb9392cb (diff)
downloadwcms-f718dc515b3d617e24578dfa875ae786e93f8295.tar.gz
wcms-f718dc515b3d617e24578dfa875ae786e93f8295.zip
Merge pull request #86 from n-peugnet/fix-summary-rendering
Fix summary rendering
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;
+ }
+}