1 | <?php |
||
4 | class Heading |
||
5 | { |
||
6 | protected $number; |
||
7 | |||
8 | protected $title; |
||
9 | |||
10 | protected $id; |
||
11 | |||
12 | protected $href; |
||
13 | |||
14 | protected $level; |
||
15 | |||
16 | 15 | public function __construct($number, $title, $href, $id = null) |
|
24 | |||
25 | 14 | public function getNumber() |
|
29 | |||
30 | 4 | public function getTitle() |
|
34 | |||
35 | 14 | public function getId() |
|
39 | |||
40 | 4 | public function getHref() |
|
48 | |||
49 | /** |
||
50 | * Creates a complete anchor href attribute for links. |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | 4 | public function getHrefAnchor() |
|
63 | |||
64 | /** |
||
65 | * Return a valid anchor string tag to use as html id attribute. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | 14 | public function getAnchor() |
|
78 | |||
79 | 10 | public function getLevel() |
|
83 | |||
84 | 10 | public function asArray() |
|
88 | } |
||
89 |