1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the syntaxhighlighter-bundle package. |
5
|
|
|
* |
6
|
|
|
* (c) 2017 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\SyntaxHighlighterBundle\API; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* SyntaxHighlighter strings. |
16
|
|
|
* |
17
|
|
|
* @author webeweb <https://github.com/webeweb/> |
18
|
|
|
* @package WBW\Bundle\SyntaxHighlighterBundle\API |
19
|
|
|
*/ |
20
|
|
|
class SyntaxHighlighterStrings { |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Alert. |
24
|
|
|
* |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
private $alert; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Brush not HTML script. |
31
|
|
|
* |
32
|
|
|
* @var string |
33
|
|
|
*/ |
34
|
|
|
private $brushNotHtmlScript; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Copy to clipboard. |
38
|
|
|
* |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
private $copyToClipboard; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* Copy to clipboard confirmation. |
45
|
|
|
* |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
private $copyToClipboardConfirmation; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Expand source. |
52
|
|
|
* |
53
|
|
|
* @var string |
54
|
|
|
*/ |
55
|
|
|
private $expandSource; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Help. |
59
|
|
|
* |
60
|
|
|
* @var string |
61
|
|
|
*/ |
62
|
|
|
private $help; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* No brush. |
66
|
|
|
* |
67
|
|
|
* @var string |
68
|
|
|
*/ |
69
|
|
|
private $noBrush; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* Print. |
73
|
|
|
* |
74
|
|
|
* @var string |
75
|
|
|
*/ |
76
|
|
|
private $print; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* View source. |
80
|
|
|
* |
81
|
|
|
* @var string |
82
|
|
|
*/ |
83
|
|
|
private $viewSource; |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* Constructor. |
87
|
|
|
*/ |
88
|
|
|
public function __construct() { |
89
|
|
|
$this->setAlert("SyntaxHighlighter\n\n"); |
90
|
|
|
$this->setBrushNotHtmlScript("Brush wasn't made for html-script option:"); |
91
|
|
|
$this->setCopyToClipboard("copy to clipboard"); |
92
|
|
|
$this->setCopyToClipboardConfirmation("The code is in your clipboard now"); |
93
|
|
|
$this->setExpandSource("+ expand source"); |
94
|
|
|
$this->setHelp("?"); |
95
|
|
|
$this->setNoBrush("Can't find brush for:"); |
96
|
|
|
$this->setPrint("print"); |
97
|
|
|
$this->setViewSource("view source"); |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* Get the alert. |
102
|
|
|
* |
103
|
|
|
* @return string Returns the alert. |
104
|
|
|
*/ |
105
|
|
|
public function getAlert() { |
106
|
|
|
return $this->alert; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* Get the brush not HTML script. |
111
|
|
|
* |
112
|
|
|
* @return string Returns the brush not HTML script. |
113
|
|
|
*/ |
114
|
|
|
public function getBrushNotHtmlScript() { |
115
|
|
|
return $this->brushNotHtmlScript; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* Get the copy to clipboard. |
120
|
|
|
* |
121
|
|
|
* @return string Returns the copy to clipboard. |
122
|
|
|
*/ |
123
|
|
|
public function getCopyToClipboard() { |
124
|
|
|
return $this->copyToClipboard; |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* Get the copy to clipboard confirmation. |
129
|
|
|
* |
130
|
|
|
* @return string Returns the copy to clipboard confirmation. |
131
|
|
|
*/ |
132
|
|
|
public function getCopyToClipboardConfirmation() { |
133
|
|
|
return $this->copyToClipboardConfirmation; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* Get the expand source. |
138
|
|
|
* |
139
|
|
|
* @return string Returns the expand source. |
140
|
|
|
*/ |
141
|
|
|
public function getExpandSource() { |
142
|
|
|
return $this->expandSource; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* Get the help. |
147
|
|
|
* |
148
|
|
|
* @return string Returns the help. |
149
|
|
|
*/ |
150
|
|
|
public function getHelp() { |
151
|
|
|
return $this->help; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* Get the no brush. |
156
|
|
|
* |
157
|
|
|
* @return string Returns the no brush. |
158
|
|
|
*/ |
159
|
|
|
public function getNoBrush() { |
160
|
|
|
return $this->noBrush; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* Get the print. |
165
|
|
|
* |
166
|
|
|
* @return string Returns the print. |
167
|
|
|
*/ |
168
|
|
|
public function getPrint() { |
169
|
|
|
return $this->print; |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* Get the view source. |
174
|
|
|
* |
175
|
|
|
* @return string Returns the view source. |
176
|
|
|
*/ |
177
|
|
|
public function getViewSource() { |
178
|
|
|
return $this->viewSource; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* Set the alert. |
183
|
|
|
* |
184
|
|
|
* @param string $alert The alert. |
185
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
186
|
|
|
*/ |
187
|
|
|
public function setAlert($alert) { |
188
|
|
|
$this->alert = $alert; |
189
|
|
|
return $this; |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
/** |
193
|
|
|
* Set the brush not HTML script. |
194
|
|
|
* |
195
|
|
|
* @param string $brushNotHtmlScript The brush not HTML script. |
196
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
197
|
|
|
*/ |
198
|
|
|
public function setBrushNotHtmlScript($brushNotHtmlScript) { |
199
|
|
|
$this->brushNotHtmlScript = $brushNotHtmlScript; |
200
|
|
|
return $this; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* Set the copy to clipboard. |
205
|
|
|
* |
206
|
|
|
* @param string $copyToClipboard The copy to clipboard. |
207
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
208
|
|
|
*/ |
209
|
|
|
public function setCopyToClipboard($copyToClipboard) { |
210
|
|
|
$this->copyToClipboard = $copyToClipboard; |
211
|
|
|
return $this; |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* Set the copy to clipboard confirmation. |
216
|
|
|
* |
217
|
|
|
* @param string $copyToClipboardConfirmation The copy to clipboard confirmation. |
218
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
219
|
|
|
*/ |
220
|
|
|
public function setCopyToClipboardConfirmation($copyToClipboardConfirmation) { |
221
|
|
|
$this->copyToClipboardConfirmation = $copyToClipboardConfirmation; |
222
|
|
|
return $this; |
223
|
|
|
} |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* Set the expand source. |
227
|
|
|
* |
228
|
|
|
* @param string $expandSource The expand source. |
229
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
230
|
|
|
*/ |
231
|
|
|
public function setExpandSource($expandSource) { |
232
|
|
|
$this->expandSource = $expandSource; |
233
|
|
|
return $this; |
234
|
|
|
} |
235
|
|
|
|
236
|
|
|
/** |
237
|
|
|
* Set the help. |
238
|
|
|
* |
239
|
|
|
* @param string $help The help. |
240
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
241
|
|
|
*/ |
242
|
|
|
public function setHelp($help) { |
243
|
|
|
$this->help = $help; |
244
|
|
|
return $this; |
245
|
|
|
} |
246
|
|
|
|
247
|
|
|
/** |
248
|
|
|
* Set the no brush. |
249
|
|
|
* |
250
|
|
|
* @param string $noBrush The no brush. |
251
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
252
|
|
|
*/ |
253
|
|
|
public function setNoBrush($noBrush) { |
254
|
|
|
$this->noBrush = $noBrush; |
255
|
|
|
return $this; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
/** |
259
|
|
|
* Set the print. |
260
|
|
|
* |
261
|
|
|
* @param string $print The print. |
262
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
263
|
|
|
*/ |
264
|
|
|
public function setPrint($print) { |
265
|
|
|
$this->print = $print; |
266
|
|
|
return $this; |
267
|
|
|
} |
268
|
|
|
|
269
|
|
|
/** |
270
|
|
|
* Set the view source. |
271
|
|
|
* |
272
|
|
|
* @param string $viewSource The view source. |
273
|
|
|
* @return SyntaxHighlighterStrings Returns this strings. |
274
|
|
|
*/ |
275
|
|
|
public function setViewSource($viewSource) { |
276
|
|
|
$this->viewSource = $viewSource; |
277
|
|
|
return $this; |
278
|
|
|
} |
279
|
|
|
} |
280
|
|
|
|