aboutsummaryrefslogtreecommitdiff
path: root/app/class/Header.php
blob: 38ae8c49d7cc57d0a9a73d47e382f3963bbabc40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?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;
    }
}