1
|
|
|
<?php |
2
|
|
|
// phpcs:ignoreFile -- this file violates PSR2 by definition |
3
|
|
|
/** |
4
|
|
|
* These classes and functions are deprecated and will be removed in future releases |
5
|
|
|
*/ |
6
|
|
|
|
7
|
|
|
use dokuwiki\Debug\DebugHelper; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* @inheritdoc |
11
|
|
|
* @deprecated 2018-05-07 |
12
|
|
|
*/ |
13
|
|
|
class RemoteAccessDeniedException extends \dokuwiki\Remote\AccessDeniedException |
14
|
|
|
{ |
15
|
|
|
/** @inheritdoc */ |
16
|
|
|
public function __construct($message = "", $code = 0, Throwable $previous = null) |
17
|
|
|
{ |
18
|
|
|
dbg_deprecated(\dokuwiki\Remote\AccessDeniedException::class); |
19
|
|
|
parent::__construct($message, $code, $previous); |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @inheritdoc |
26
|
|
|
* @deprecated 2018-05-07 |
27
|
|
|
*/ |
28
|
|
|
class RemoteException extends \dokuwiki\Remote\RemoteException |
29
|
|
|
{ |
30
|
|
|
/** @inheritdoc */ |
31
|
|
|
public function __construct($message = "", $code = 0, Throwable $previous = null) |
32
|
|
|
{ |
33
|
|
|
dbg_deprecated(\dokuwiki\Remote\RemoteException::class); |
34
|
|
|
parent::__construct($message, $code, $previous); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Escapes regex characters other than (, ) and / |
41
|
|
|
* |
42
|
|
|
* @param string $str |
43
|
|
|
* @return string |
44
|
|
|
* @deprecated 2018-05-04 |
45
|
|
|
*/ |
46
|
|
|
function Doku_Lexer_Escape($str) |
47
|
|
|
{ |
48
|
|
|
dbg_deprecated('\\dokuwiki\\Parsing\\Lexer\\Lexer::escape()'); |
49
|
|
|
return \dokuwiki\Parsing\Lexer\Lexer::escape($str); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @inheritdoc |
54
|
|
|
* @deprecated 2018-06-01 |
55
|
|
|
*/ |
56
|
|
|
class setting extends \dokuwiki\plugin\config\core\Setting\Setting |
57
|
|
|
{ |
58
|
|
|
/** @inheritdoc */ |
59
|
|
|
public function __construct($key, array $params = null) |
60
|
|
|
{ |
61
|
|
|
dbg_deprecated(\dokuwiki\plugin\config\core\Setting\Setting::class); |
62
|
|
|
parent::__construct($key, $params); |
63
|
|
|
} |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @inheritdoc |
68
|
|
|
* @deprecated 2018-06-01 |
69
|
|
|
*/ |
70
|
|
|
class setting_authtype extends \dokuwiki\plugin\config\core\Setting\SettingAuthtype |
71
|
|
|
{ |
72
|
|
|
/** @inheritdoc */ |
73
|
|
|
public function __construct($key, array $params = null) |
74
|
|
|
{ |
75
|
|
|
dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingAuthtype::class); |
76
|
|
|
parent::__construct($key, $params); |
77
|
|
|
} |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @inheritdoc |
82
|
|
|
* @deprecated 2018-06-01 |
83
|
|
|
*/ |
84
|
|
|
class setting_string extends \dokuwiki\plugin\config\core\Setting\SettingString |
85
|
|
|
{ |
86
|
|
|
/** @inheritdoc */ |
87
|
|
|
public function __construct($key, array $params = null) |
88
|
|
|
{ |
89
|
|
|
dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingString::class); |
90
|
|
|
parent::__construct($key, $params); |
91
|
|
|
} |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @inheritdoc |
96
|
|
|
* @deprecated 2018-06-15 |
97
|
|
|
*/ |
98
|
|
|
class PageChangelog extends \dokuwiki\ChangeLog\PageChangeLog |
99
|
|
|
{ |
100
|
|
|
/** @inheritdoc */ |
101
|
|
|
public function __construct($id, $chunk_size = 8192) |
102
|
|
|
{ |
103
|
|
|
dbg_deprecated(\dokuwiki\ChangeLog\PageChangeLog::class); |
104
|
|
|
parent::__construct($id, $chunk_size); |
105
|
|
|
} |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @inheritdoc |
110
|
|
|
* @deprecated 2018-06-15 |
111
|
|
|
*/ |
112
|
|
|
class MediaChangelog extends \dokuwiki\ChangeLog\MediaChangeLog |
113
|
|
|
{ |
114
|
|
|
/** @inheritdoc */ |
115
|
|
|
public function __construct($id, $chunk_size = 8192) |
116
|
|
|
{ |
117
|
|
|
dbg_deprecated(\dokuwiki\ChangeLog\MediaChangeLog::class); |
118
|
|
|
parent::__construct($id, $chunk_size); |
119
|
|
|
} |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** Behavior switch for JSON::decode() */ |
123
|
|
|
define('JSON_LOOSE_TYPE', 16); |
124
|
|
|
|
125
|
|
|
/** Behavior switch for JSON::decode() */ |
126
|
|
|
define('JSON_STRICT_TYPE', 0); |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* Encode/Decode JSON |
130
|
|
|
* @deprecated 2018-07-27 |
131
|
|
|
*/ |
132
|
|
|
class JSON |
133
|
|
|
{ |
134
|
|
|
protected $use = 0; |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @param int $use JSON_*_TYPE flag |
138
|
|
|
* @deprecated 2018-07-27 |
139
|
|
|
*/ |
140
|
|
|
public function __construct($use = JSON_STRICT_TYPE) |
141
|
|
|
{ |
142
|
|
|
$this->use = $use; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* Encode given structure to JSON |
147
|
|
|
* |
148
|
|
|
* @param mixed $var |
149
|
|
|
* @return string |
150
|
|
|
* @deprecated 2018-07-27 |
151
|
|
|
*/ |
152
|
|
|
public function encode($var) |
153
|
|
|
{ |
154
|
|
|
dbg_deprecated('json_encode'); |
155
|
|
|
return json_encode($var); |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* Alias for encode() |
160
|
|
|
* @param $var |
161
|
|
|
* @return string |
162
|
|
|
* @deprecated 2018-07-27 |
163
|
|
|
*/ |
164
|
|
|
public function enc($var) { |
165
|
|
|
return $this->encode($var); |
|
|
|
|
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* Decode given string from JSON |
170
|
|
|
* |
171
|
|
|
* @param string $str |
172
|
|
|
* @return mixed |
173
|
|
|
* @deprecated 2018-07-27 |
174
|
|
|
*/ |
175
|
|
|
public function decode($str) |
176
|
|
|
{ |
177
|
|
|
dbg_deprecated('json_encode'); |
178
|
|
|
return json_decode($str, ($this->use == JSON_LOOSE_TYPE)); |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* Alias for decode |
183
|
|
|
* |
184
|
|
|
* @param $str |
185
|
|
|
* @return mixed |
186
|
|
|
* @deprecated 2018-07-27 |
187
|
|
|
*/ |
188
|
|
|
public function dec($str) { |
189
|
|
|
return $this->decode($str); |
|
|
|
|
190
|
|
|
} |
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* @inheritdoc |
195
|
|
|
* @deprecated 2019-02-19 |
196
|
|
|
*/ |
197
|
|
|
class Input extends \dokuwiki\Input\Input { |
198
|
|
|
/** |
199
|
|
|
* @inheritdoc |
200
|
|
|
* @deprecated 2019-02-19 |
201
|
|
|
*/ |
202
|
|
|
public function __construct() |
203
|
|
|
{ |
204
|
|
|
dbg_deprecated(\dokuwiki\Input\Input::class); |
205
|
|
|
parent::__construct(); |
206
|
|
|
} |
207
|
|
|
} |
208
|
|
|
|
209
|
|
|
/** |
210
|
|
|
* @inheritdoc |
211
|
|
|
* @deprecated 2019-02-19 |
212
|
|
|
*/ |
213
|
|
|
class PostInput extends \dokuwiki\Input\Post { |
214
|
|
|
/** |
215
|
|
|
* @inheritdoc |
216
|
|
|
* @deprecated 2019-02-19 |
217
|
|
|
*/ |
218
|
|
|
public function __construct() |
219
|
|
|
{ |
220
|
|
|
dbg_deprecated(\dokuwiki\Input\Post::class); |
221
|
|
|
parent::__construct(); |
222
|
|
|
} |
223
|
|
|
} |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* @inheritdoc |
227
|
|
|
* @deprecated 2019-02-19 |
228
|
|
|
*/ |
229
|
|
|
class GetInput extends \dokuwiki\Input\Get { |
230
|
|
|
/** |
231
|
|
|
* @inheritdoc |
232
|
|
|
* @deprecated 2019-02-19 |
233
|
|
|
*/ |
234
|
|
|
public function __construct() |
235
|
|
|
{ |
236
|
|
|
dbg_deprecated(\dokuwiki\Input\Get::class); |
237
|
|
|
parent::__construct(); |
238
|
|
|
} |
239
|
|
|
} |
240
|
|
|
|
241
|
|
|
/** |
242
|
|
|
* @inheritdoc |
243
|
|
|
* @deprecated 2019-02-19 |
244
|
|
|
*/ |
245
|
|
|
class ServerInput extends \dokuwiki\Input\Server { |
246
|
|
|
/** |
247
|
|
|
* @inheritdoc |
248
|
|
|
* @deprecated 2019-02-19 |
249
|
|
|
*/ |
250
|
|
|
public function __construct() |
251
|
|
|
{ |
252
|
|
|
dbg_deprecated(\dokuwiki\Input\Server::class); |
253
|
|
|
parent::__construct(); |
254
|
|
|
} |
255
|
|
|
} |
256
|
|
|
|
257
|
|
|
/** |
258
|
|
|
* @inheritdoc |
259
|
|
|
* @deprecated 2019-03-06 |
260
|
|
|
*/ |
261
|
|
|
class PassHash extends \dokuwiki\PassHash { |
262
|
|
|
/** |
263
|
|
|
* @inheritdoc |
264
|
|
|
* @deprecated 2019-03-06 |
265
|
|
|
*/ |
266
|
|
|
public function __construct() |
267
|
|
|
{ |
268
|
|
|
dbg_deprecated(\dokuwiki\PassHash::class); |
269
|
|
|
} |
270
|
|
|
} |
271
|
|
|
|
272
|
|
|
/** |
273
|
|
|
* @deprecated since 2019-03-17 use \dokuwiki\HTTP\HTTPClientException instead! |
274
|
|
|
*/ |
275
|
|
|
class HTTPClientException extends \dokuwiki\HTTP\HTTPClientException { |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* @inheritdoc |
279
|
|
|
* @deprecated 2019-03-17 |
280
|
|
|
*/ |
281
|
|
|
public function __construct($message = '', $code = 0, $previous = null) |
282
|
|
|
{ |
283
|
|
|
DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\HTTPClientException::class); |
284
|
|
|
parent::__construct($message, $code, $previous); |
285
|
|
|
} |
286
|
|
|
} |
287
|
|
|
|
288
|
|
|
/** |
289
|
|
|
* @deprecated since 2019-03-17 use \dokuwiki\HTTP\HTTPClient instead! |
290
|
|
|
*/ |
291
|
|
|
class HTTPClient extends \dokuwiki\HTTP\HTTPClient { |
292
|
|
|
|
293
|
|
|
/** |
294
|
|
|
* @inheritdoc |
295
|
|
|
* @deprecated 2019-03-17 |
296
|
|
|
*/ |
297
|
|
|
public function __construct() |
298
|
|
|
{ |
299
|
|
|
DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\HTTPClient::class); |
300
|
|
|
parent::__construct(); |
301
|
|
|
} |
302
|
|
|
} |
303
|
|
|
|
304
|
|
|
/** |
305
|
|
|
* @deprecated since 2019-03-17 use \dokuwiki\HTTP\DokuHTTPClient instead! |
306
|
|
|
*/ |
307
|
|
|
class DokuHTTPClient extends \dokuwiki\HTTP\DokuHTTPClient |
308
|
|
|
{ |
309
|
|
|
|
310
|
|
|
/** |
311
|
|
|
* @inheritdoc |
312
|
|
|
* @deprecated 2019-03-17 |
313
|
|
|
*/ |
314
|
|
|
public function __construct() |
315
|
|
|
{ |
316
|
|
|
DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\DokuHTTPClient::class); |
317
|
|
|
parent::__construct(); |
318
|
|
|
} |
319
|
|
|
} |
320
|
|
|
|
321
|
|
|
/** |
322
|
|
|
* function wrapper to process (create, trigger and destroy) an event |
323
|
|
|
* |
324
|
|
|
* @param string $name name for the event |
325
|
|
|
* @param mixed $data event data |
326
|
|
|
* @param callback $action (optional, default=NULL) default action, a php callback function |
327
|
|
|
* @param bool $canPreventDefault (optional, default=true) can hooks prevent the default action |
328
|
|
|
* |
329
|
|
|
* @return mixed the event results value after all event processing is complete |
330
|
|
|
* by default this is the return value of the default action however |
331
|
|
|
* it can be set or modified by event handler hooks |
332
|
|
|
* @deprecated 2018-06-15 |
333
|
|
|
*/ |
334
|
|
|
function trigger_event($name, &$data, $action=null, $canPreventDefault=true) { |
335
|
|
|
dbg_deprecated('\dokuwiki\Extension\Event::createAndTrigger'); |
336
|
|
|
return \dokuwiki\Extension\Event::createAndTrigger($name, $data, $action, $canPreventDefault); |
337
|
|
|
} |
338
|
|
|
|
339
|
|
|
/** |
340
|
|
|
* @inheritdoc |
341
|
|
|
* @deprecated 2018-06-15 |
342
|
|
|
*/ |
343
|
|
|
class Doku_Plugin_Controller extends \dokuwiki\Extension\PluginController { |
344
|
|
|
/** @inheritdoc */ |
345
|
|
|
public function __construct() |
346
|
|
|
{ |
347
|
|
|
dbg_deprecated(\dokuwiki\Extension\PluginController::class); |
348
|
|
|
parent::__construct(); |
349
|
|
|
} |
350
|
|
|
} |
351
|
|
|
|
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.