1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the bootstrap-bundle package. |
5
|
|
|
* |
6
|
|
|
* (c) 2018 WEBEWEB |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace WBW\Bundle\BootstrapBundle\Model; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Wiki page model. |
16
|
|
|
* |
17
|
|
|
* @author webeweb <https://github.com/webeweb/> |
18
|
|
|
* @package WBW\Bundle\BootstrapBundle\Model |
19
|
|
|
*/ |
20
|
|
|
class WikiPage { |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Bundle. |
24
|
|
|
* |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
private $bundle; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Category. |
31
|
|
|
* |
32
|
|
|
* @var string |
33
|
|
|
*/ |
34
|
|
|
private $category; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Package. |
38
|
|
|
* |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
private $package; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* Page. |
45
|
|
|
* |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
private $page; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Title. |
52
|
|
|
* |
53
|
|
|
* @var string |
54
|
|
|
*/ |
55
|
|
|
private $title; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Constructor. |
59
|
|
|
* |
60
|
|
|
* @param string $category The category. |
61
|
|
|
* @param string $package The package. |
62
|
|
|
* @param string $page The page. |
63
|
|
|
* @param string $title The title. |
64
|
|
|
*/ |
65
|
|
|
public function __construct($category, $package, $page, $title) { |
66
|
|
|
$this->setBundle("Bootstrap"); |
67
|
|
|
$this->setCategory($category); |
68
|
|
|
$this->setPackage($package); |
69
|
|
|
$this->setPage($page); |
70
|
|
|
$this->setTitle($title); |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* Get the bundle. |
75
|
|
|
* |
76
|
|
|
* @return string Returns the bundle. |
77
|
|
|
*/ |
78
|
|
|
public function getBundle() { |
79
|
|
|
return $this->bundle; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Get the category. |
84
|
|
|
* |
85
|
|
|
* @return string Returns the category. |
86
|
|
|
*/ |
87
|
|
|
public function getCategory() { |
88
|
|
|
return $this->category; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* Get the package. |
93
|
|
|
* |
94
|
|
|
* @return string Returns the package. |
95
|
|
|
*/ |
96
|
|
|
public function getPackage() { |
97
|
|
|
return $this->package; |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* Get the page. |
102
|
|
|
* |
103
|
|
|
* @return string Returns the page. |
104
|
|
|
*/ |
105
|
|
|
public function getPage() { |
106
|
|
|
return $this->page; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* Get the title. |
111
|
|
|
* |
112
|
|
|
* @return string Returns the title. |
113
|
|
|
*/ |
114
|
|
|
public function getTitle() { |
115
|
|
|
return $this->title; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* Set the bundle. |
120
|
|
|
* |
121
|
|
|
* @param string $bundle The bundle. |
122
|
|
|
* @return WikiPage Returns this wiki page. |
123
|
|
|
*/ |
124
|
|
|
public function setBundle($bundle) { |
125
|
|
|
$this->bundle = $bundle; |
126
|
|
|
return $this; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* Set the category. |
131
|
|
|
* |
132
|
|
|
* @param string $category The category. |
133
|
|
|
* @return WikiPage Returns this wiki page. |
134
|
|
|
*/ |
135
|
|
|
public function setCategory($category) { |
136
|
|
|
$this->category = $category; |
137
|
|
|
return $this; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* Set the package. |
142
|
|
|
* |
143
|
|
|
* @param string $package The package. |
144
|
|
|
* @return WikiPage Returns this wiki page. |
145
|
|
|
*/ |
146
|
|
|
public function setPackage($package) { |
147
|
|
|
$this->package = $package; |
148
|
|
|
return $this; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* Set the page. |
153
|
|
|
* |
154
|
|
|
* @param string $page The page. |
155
|
|
|
* @return WikiPage Returns this wiki page. |
156
|
|
|
*/ |
157
|
|
|
public function setPage($page) { |
158
|
|
|
$this->page = $page; |
159
|
|
|
return $this; |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* Set the title. |
164
|
|
|
* |
165
|
|
|
* @param string $title The title. |
166
|
|
|
* @return WikiPage Returns this wiki page. |
167
|
|
|
*/ |
168
|
|
|
public function setTitle($title) { |
169
|
|
|
$this->title = $title; |
170
|
|
|
return $this; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
} |
174
|
|
|
|