xref: /dokuwiki/inc/deprecated.php (revision f9a94e78392d6a178b0e7f29a005688fc44e5cc3)
14cdb6842SAndreas Gohr<?php
2b78f68bcSAndreas Gohr// phpcs:ignoreFile -- this file violates PSR2 by definition
34cdb6842SAndreas Gohr/**
44cdb6842SAndreas Gohr * These classes and functions are deprecated and will be removed in future releases
5a0aeafaaSAndreas Gohr *
6a0aeafaaSAndreas Gohr * Note: when adding to this file, please also add appropriate actions to _test/rector.php
74cdb6842SAndreas Gohr */
84cdb6842SAndreas Gohr
9451969abSMichael Großeuse dokuwiki\Debug\DebugHelper;
10451969abSMichael Großeuse dokuwiki\Subscriptions\BulkSubscriptionSender;
11451969abSMichael Großeuse dokuwiki\Subscriptions\MediaSubscriptionSender;
12451969abSMichael Großeuse dokuwiki\Subscriptions\PageSubscriptionSender;
13451969abSMichael Großeuse dokuwiki\Subscriptions\RegistrationSubscriptionSender;
14451969abSMichael Großeuse dokuwiki\Subscriptions\SubscriberManager;
15451969abSMichael Große
164cdb6842SAndreas Gohr/**
174cdb6842SAndreas Gohr * @inheritdoc
184cdb6842SAndreas Gohr * @deprecated 2018-05-07
194cdb6842SAndreas Gohr */
20d443762bSAndreas Gohrclass RemoteAccessDeniedException extends \dokuwiki\Remote\AccessDeniedException
21d443762bSAndreas Gohr{
224cdb6842SAndreas Gohr    /** @inheritdoc */
23d443762bSAndreas Gohr    public function __construct($message = "", $code = 0, Throwable $previous = null)
24d443762bSAndreas Gohr    {
25a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\Remote\AccessDeniedException::class);
264cdb6842SAndreas Gohr        parent::__construct($message, $code, $previous);
274cdb6842SAndreas Gohr    }
284cdb6842SAndreas Gohr
294cdb6842SAndreas Gohr}
304cdb6842SAndreas Gohr
314cdb6842SAndreas Gohr/**
324cdb6842SAndreas Gohr * @inheritdoc
334cdb6842SAndreas Gohr * @deprecated 2018-05-07
344cdb6842SAndreas Gohr */
35d443762bSAndreas Gohrclass RemoteException extends \dokuwiki\Remote\RemoteException
36d443762bSAndreas Gohr{
374cdb6842SAndreas Gohr    /** @inheritdoc */
38d443762bSAndreas Gohr    public function __construct($message = "", $code = 0, Throwable $previous = null)
39d443762bSAndreas Gohr    {
40a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\Remote\RemoteException::class);
414cdb6842SAndreas Gohr        parent::__construct($message, $code, $previous);
424cdb6842SAndreas Gohr    }
434cdb6842SAndreas Gohr
444cdb6842SAndreas Gohr}
454cdb6842SAndreas Gohr
464cdb6842SAndreas Gohr/**
474cdb6842SAndreas Gohr * Escapes regex characters other than (, ) and /
484cdb6842SAndreas Gohr *
494cdb6842SAndreas Gohr * @param string $str
504cdb6842SAndreas Gohr * @return string
514cdb6842SAndreas Gohr * @deprecated 2018-05-04
524cdb6842SAndreas Gohr */
53d443762bSAndreas Gohrfunction Doku_Lexer_Escape($str)
54d443762bSAndreas Gohr{
55a6e1db4aSAndreas Gohr    dbg_deprecated('\\dokuwiki\\Parsing\\Lexer\\Lexer::escape()');
564cdb6842SAndreas Gohr    return \dokuwiki\Parsing\Lexer\Lexer::escape($str);
574cdb6842SAndreas Gohr}
58a6e1db4aSAndreas Gohr
59a6e1db4aSAndreas Gohr/**
60a6e1db4aSAndreas Gohr * @inheritdoc
61a6e1db4aSAndreas Gohr * @deprecated 2018-06-01
62a6e1db4aSAndreas Gohr */
63d443762bSAndreas Gohrclass setting extends \dokuwiki\plugin\config\core\Setting\Setting
64d443762bSAndreas Gohr{
65a6e1db4aSAndreas Gohr    /** @inheritdoc */
66d443762bSAndreas Gohr    public function __construct($key, array $params = null)
67d443762bSAndreas Gohr    {
68a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\Setting::class);
69a6e1db4aSAndreas Gohr        parent::__construct($key, $params);
70a6e1db4aSAndreas Gohr    }
71a6e1db4aSAndreas Gohr}
72a6e1db4aSAndreas Gohr
73a6e1db4aSAndreas Gohr/**
74a6e1db4aSAndreas Gohr * @inheritdoc
75a6e1db4aSAndreas Gohr * @deprecated 2018-06-01
76a6e1db4aSAndreas Gohr */
77d443762bSAndreas Gohrclass setting_authtype extends \dokuwiki\plugin\config\core\Setting\SettingAuthtype
78d443762bSAndreas Gohr{
79a6e1db4aSAndreas Gohr    /** @inheritdoc */
80d443762bSAndreas Gohr    public function __construct($key, array $params = null)
81d443762bSAndreas Gohr    {
82a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingAuthtype::class);
83a6e1db4aSAndreas Gohr        parent::__construct($key, $params);
84a6e1db4aSAndreas Gohr    }
85a6e1db4aSAndreas Gohr}
86a6e1db4aSAndreas Gohr
87a6e1db4aSAndreas Gohr/**
88a6e1db4aSAndreas Gohr * @inheritdoc
89a6e1db4aSAndreas Gohr * @deprecated 2018-06-01
90a6e1db4aSAndreas Gohr */
91d443762bSAndreas Gohrclass setting_string extends \dokuwiki\plugin\config\core\Setting\SettingString
92d443762bSAndreas Gohr{
93a6e1db4aSAndreas Gohr    /** @inheritdoc */
94d443762bSAndreas Gohr    public function __construct($key, array $params = null)
95d443762bSAndreas Gohr    {
96a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingString::class);
97a6e1db4aSAndreas Gohr        parent::__construct($key, $params);
98a6e1db4aSAndreas Gohr    }
99a6e1db4aSAndreas Gohr}
1000c3a5702SAndreas Gohr
1010c3a5702SAndreas Gohr/**
1020c3a5702SAndreas Gohr * @inheritdoc
1030c3a5702SAndreas Gohr * @deprecated 2018-06-15
1040c3a5702SAndreas Gohr */
105d443762bSAndreas Gohrclass PageChangelog extends \dokuwiki\ChangeLog\PageChangeLog
106d443762bSAndreas Gohr{
1070c3a5702SAndreas Gohr    /** @inheritdoc */
1080c3a5702SAndreas Gohr    public function __construct($id, $chunk_size = 8192)
1090c3a5702SAndreas Gohr    {
1100c3a5702SAndreas Gohr        dbg_deprecated(\dokuwiki\ChangeLog\PageChangeLog::class);
1110c3a5702SAndreas Gohr        parent::__construct($id, $chunk_size);
1120c3a5702SAndreas Gohr    }
1130c3a5702SAndreas Gohr}
1140c3a5702SAndreas Gohr
1150c3a5702SAndreas Gohr/**
1160c3a5702SAndreas Gohr * @inheritdoc
1170c3a5702SAndreas Gohr * @deprecated 2018-06-15
1180c3a5702SAndreas Gohr */
119d443762bSAndreas Gohrclass MediaChangelog extends \dokuwiki\ChangeLog\MediaChangeLog
120d443762bSAndreas Gohr{
1210c3a5702SAndreas Gohr    /** @inheritdoc */
1220c3a5702SAndreas Gohr    public function __construct($id, $chunk_size = 8192)
1230c3a5702SAndreas Gohr    {
1240c3a5702SAndreas Gohr        dbg_deprecated(\dokuwiki\ChangeLog\MediaChangeLog::class);
1250c3a5702SAndreas Gohr        parent::__construct($id, $chunk_size);
1260c3a5702SAndreas Gohr    }
1270c3a5702SAndreas Gohr}
128d443762bSAndreas Gohr
129d443762bSAndreas Gohr/** Behavior switch for JSON::decode() */
130d443762bSAndreas Gohrdefine('JSON_LOOSE_TYPE', 16);
131d443762bSAndreas Gohr
132d443762bSAndreas Gohr/** Behavior switch for JSON::decode() */
133d443762bSAndreas Gohrdefine('JSON_STRICT_TYPE', 0);
134d443762bSAndreas Gohr
135d443762bSAndreas Gohr/**
136d443762bSAndreas Gohr * Encode/Decode JSON
137d443762bSAndreas Gohr * @deprecated 2018-07-27
138d443762bSAndreas Gohr */
139d443762bSAndreas Gohrclass JSON
140d443762bSAndreas Gohr{
141d443762bSAndreas Gohr    protected $use = 0;
142d443762bSAndreas Gohr
143d443762bSAndreas Gohr    /**
144d443762bSAndreas Gohr     * @param int $use JSON_*_TYPE flag
145d443762bSAndreas Gohr     * @deprecated  2018-07-27
146d443762bSAndreas Gohr     */
147d443762bSAndreas Gohr    public function __construct($use = JSON_STRICT_TYPE)
148d443762bSAndreas Gohr    {
149d443762bSAndreas Gohr        $this->use = $use;
150d443762bSAndreas Gohr    }
151d443762bSAndreas Gohr
152d443762bSAndreas Gohr    /**
153d443762bSAndreas Gohr     * Encode given structure to JSON
154d443762bSAndreas Gohr     *
155d443762bSAndreas Gohr     * @param mixed $var
156d443762bSAndreas Gohr     * @return string
157d443762bSAndreas Gohr     * @deprecated  2018-07-27
158d443762bSAndreas Gohr     */
159d443762bSAndreas Gohr    public function encode($var)
160d443762bSAndreas Gohr    {
161d443762bSAndreas Gohr        dbg_deprecated('json_encode');
162d443762bSAndreas Gohr        return json_encode($var);
163d443762bSAndreas Gohr    }
164d443762bSAndreas Gohr
165d443762bSAndreas Gohr    /**
166d443762bSAndreas Gohr     * Alias for encode()
167d443762bSAndreas Gohr     * @param $var
168d443762bSAndreas Gohr     * @return string
169d443762bSAndreas Gohr     * @deprecated  2018-07-27
170d443762bSAndreas Gohr     */
171d443762bSAndreas Gohr    public function enc($var) {
172d443762bSAndreas Gohr        return $this->encode($var);
173d443762bSAndreas Gohr    }
174d443762bSAndreas Gohr
175d443762bSAndreas Gohr    /**
176d443762bSAndreas Gohr     * Decode given string from JSON
177d443762bSAndreas Gohr     *
178d443762bSAndreas Gohr     * @param string $str
179d443762bSAndreas Gohr     * @return mixed
180d443762bSAndreas Gohr     * @deprecated  2018-07-27
181d443762bSAndreas Gohr     */
182d443762bSAndreas Gohr    public function decode($str)
183d443762bSAndreas Gohr    {
184d443762bSAndreas Gohr        dbg_deprecated('json_encode');
185d443762bSAndreas Gohr        return json_decode($str, ($this->use == JSON_LOOSE_TYPE));
186d443762bSAndreas Gohr    }
187d443762bSAndreas Gohr
188d443762bSAndreas Gohr    /**
189d443762bSAndreas Gohr     * Alias for decode
190d443762bSAndreas Gohr     *
191d443762bSAndreas Gohr     * @param $str
192d443762bSAndreas Gohr     * @return mixed
193d443762bSAndreas Gohr     * @deprecated  2018-07-27
194d443762bSAndreas Gohr     */
195d443762bSAndreas Gohr    public function dec($str) {
196d443762bSAndreas Gohr        return $this->decode($str);
197d443762bSAndreas Gohr    }
198d443762bSAndreas Gohr}
199ccc4c71cSAndreas Gohr
200ccc4c71cSAndreas Gohr/**
201ccc4c71cSAndreas Gohr * @inheritdoc
202ccc4c71cSAndreas Gohr * @deprecated 2019-02-19
203ccc4c71cSAndreas Gohr */
204ccc4c71cSAndreas Gohrclass Input extends \dokuwiki\Input\Input {
205ccc4c71cSAndreas Gohr    /**
206ccc4c71cSAndreas Gohr     * @inheritdoc
207ccc4c71cSAndreas Gohr     * @deprecated 2019-02-19
208ccc4c71cSAndreas Gohr     */
209ccc4c71cSAndreas Gohr    public function __construct()
210ccc4c71cSAndreas Gohr    {
211ccc4c71cSAndreas Gohr        dbg_deprecated(\dokuwiki\Input\Input::class);
212ccc4c71cSAndreas Gohr        parent::__construct();
213ccc4c71cSAndreas Gohr    }
214ccc4c71cSAndreas Gohr}
215ccc4c71cSAndreas Gohr
216ccc4c71cSAndreas Gohr/**
217ccc4c71cSAndreas Gohr * @inheritdoc
218ccc4c71cSAndreas Gohr * @deprecated 2019-02-19
219ccc4c71cSAndreas Gohr */
220ccc4c71cSAndreas Gohrclass PostInput extends \dokuwiki\Input\Post {
221ccc4c71cSAndreas Gohr    /**
222ccc4c71cSAndreas Gohr     * @inheritdoc
223ccc4c71cSAndreas Gohr     * @deprecated 2019-02-19
224ccc4c71cSAndreas Gohr     */
225ccc4c71cSAndreas Gohr    public function __construct()
226ccc4c71cSAndreas Gohr    {
227ccc4c71cSAndreas Gohr        dbg_deprecated(\dokuwiki\Input\Post::class);
228ccc4c71cSAndreas Gohr        parent::__construct();
229ccc4c71cSAndreas Gohr    }
230ccc4c71cSAndreas Gohr}
231ccc4c71cSAndreas Gohr
232ccc4c71cSAndreas Gohr/**
233ccc4c71cSAndreas Gohr * @inheritdoc
234ccc4c71cSAndreas Gohr * @deprecated 2019-02-19
235ccc4c71cSAndreas Gohr */
236ccc4c71cSAndreas Gohrclass GetInput extends \dokuwiki\Input\Get {
237ccc4c71cSAndreas Gohr    /**
238ccc4c71cSAndreas Gohr     * @inheritdoc
239ccc4c71cSAndreas Gohr     * @deprecated 2019-02-19
240ccc4c71cSAndreas Gohr     */
241ccc4c71cSAndreas Gohr    public function __construct()
242ccc4c71cSAndreas Gohr    {
243ccc4c71cSAndreas Gohr        dbg_deprecated(\dokuwiki\Input\Get::class);
244ccc4c71cSAndreas Gohr        parent::__construct();
245ccc4c71cSAndreas Gohr    }
246ccc4c71cSAndreas Gohr}
247ccc4c71cSAndreas Gohr
248ccc4c71cSAndreas Gohr/**
249ccc4c71cSAndreas Gohr * @inheritdoc
250ccc4c71cSAndreas Gohr * @deprecated 2019-02-19
251ccc4c71cSAndreas Gohr */
252ccc4c71cSAndreas Gohrclass ServerInput extends \dokuwiki\Input\Server {
253ccc4c71cSAndreas Gohr    /**
254ccc4c71cSAndreas Gohr     * @inheritdoc
255ccc4c71cSAndreas Gohr     * @deprecated 2019-02-19
256ccc4c71cSAndreas Gohr     */
257ccc4c71cSAndreas Gohr    public function __construct()
258ccc4c71cSAndreas Gohr    {
259ccc4c71cSAndreas Gohr        dbg_deprecated(\dokuwiki\Input\Server::class);
260ccc4c71cSAndreas Gohr        parent::__construct();
261ccc4c71cSAndreas Gohr    }
262ccc4c71cSAndreas Gohr}
263c3cc6e05SAndreas Gohr
264c3cc6e05SAndreas Gohr/**
265c3cc6e05SAndreas Gohr * @inheritdoc
266c3cc6e05SAndreas Gohr * @deprecated 2019-03-06
267c3cc6e05SAndreas Gohr */
268c3cc6e05SAndreas Gohrclass PassHash extends \dokuwiki\PassHash {
269c3cc6e05SAndreas Gohr    /**
270c3cc6e05SAndreas Gohr     * @inheritdoc
271c3cc6e05SAndreas Gohr     * @deprecated 2019-03-06
272c3cc6e05SAndreas Gohr     */
273c3cc6e05SAndreas Gohr    public function __construct()
274c3cc6e05SAndreas Gohr    {
275c3cc6e05SAndreas Gohr        dbg_deprecated(\dokuwiki\PassHash::class);
276c3cc6e05SAndreas Gohr    }
277c3cc6e05SAndreas Gohr}
27860b9af73SMichael Große
27960b9af73SMichael Große/**
2805a8d6e48SMichael Große * @deprecated since 2019-03-17 use \dokuwiki\HTTP\HTTPClientException instead!
28160b9af73SMichael Große */
2825a8d6e48SMichael Großeclass HTTPClientException extends \dokuwiki\HTTP\HTTPClientException {
28360b9af73SMichael Große
28460b9af73SMichael Große    /**
28560b9af73SMichael Große     * @inheritdoc
28660b9af73SMichael Große     * @deprecated 2019-03-17
28760b9af73SMichael Große     */
28860b9af73SMichael Große    public function __construct($message = '', $code = 0, $previous = null)
28960b9af73SMichael Große    {
2905a8d6e48SMichael Große        DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\HTTPClientException::class);
29160b9af73SMichael Große        parent::__construct($message, $code, $previous);
29260b9af73SMichael Große    }
29360b9af73SMichael Große}
29460b9af73SMichael Große
29560b9af73SMichael Große/**
2965a8d6e48SMichael Große * @deprecated since 2019-03-17 use \dokuwiki\HTTP\HTTPClient instead!
29760b9af73SMichael Große */
2985a8d6e48SMichael Großeclass HTTPClient extends \dokuwiki\HTTP\HTTPClient {
29960b9af73SMichael Große
30060b9af73SMichael Große    /**
30160b9af73SMichael Große     * @inheritdoc
30260b9af73SMichael Große     * @deprecated 2019-03-17
30360b9af73SMichael Große     */
30460b9af73SMichael Große    public function __construct()
30560b9af73SMichael Große    {
3065a8d6e48SMichael Große        DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\HTTPClient::class);
30760b9af73SMichael Große        parent::__construct();
30860b9af73SMichael Große    }
30960b9af73SMichael Große}
31060b9af73SMichael Große
31160b9af73SMichael Große/**
3125a8d6e48SMichael Große * @deprecated since 2019-03-17 use \dokuwiki\HTTP\DokuHTTPClient instead!
31360b9af73SMichael Große */
314cbb44eabSAndreas Gohrclass DokuHTTPClient extends \dokuwiki\HTTP\DokuHTTPClient
315cbb44eabSAndreas Gohr{
31660b9af73SMichael Große
31760b9af73SMichael Große    /**
31860b9af73SMichael Große     * @inheritdoc
31960b9af73SMichael Große     * @deprecated 2019-03-17
32060b9af73SMichael Große     */
32160b9af73SMichael Große    public function __construct()
32260b9af73SMichael Große    {
3235a8d6e48SMichael Große        DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\DokuHTTPClient::class);
32460b9af73SMichael Große        parent::__construct();
32560b9af73SMichael Große    }
326cbb44eabSAndreas Gohr}
32760b9af73SMichael Große
328cbb44eabSAndreas Gohr/**
329cbb44eabSAndreas Gohr * function wrapper to process (create, trigger and destroy) an event
330cbb44eabSAndreas Gohr *
331cbb44eabSAndreas Gohr * @param  string   $name               name for the event
332cbb44eabSAndreas Gohr * @param  mixed    $data               event data
333cbb44eabSAndreas Gohr * @param  callback $action             (optional, default=NULL) default action, a php callback function
334cbb44eabSAndreas Gohr * @param  bool     $canPreventDefault  (optional, default=true) can hooks prevent the default action
335cbb44eabSAndreas Gohr *
336cbb44eabSAndreas Gohr * @return mixed                        the event results value after all event processing is complete
337cbb44eabSAndreas Gohr *                                      by default this is the return value of the default action however
338cbb44eabSAndreas Gohr *                                      it can be set or modified by event handler hooks
339cbb44eabSAndreas Gohr * @deprecated 2018-06-15
340cbb44eabSAndreas Gohr */
341cbb44eabSAndreas Gohrfunction trigger_event($name, &$data, $action=null, $canPreventDefault=true) {
342cbb44eabSAndreas Gohr    dbg_deprecated('\dokuwiki\Extension\Event::createAndTrigger');
343cbb44eabSAndreas Gohr    return \dokuwiki\Extension\Event::createAndTrigger($name, $data, $action, $canPreventDefault);
34460b9af73SMichael Große}
3453a7140a1SAndreas Gohr
3463a7140a1SAndreas Gohr/**
3473a7140a1SAndreas Gohr * @inheritdoc
3483a7140a1SAndreas Gohr * @deprecated 2018-06-15
3493a7140a1SAndreas Gohr */
3503a7140a1SAndreas Gohrclass Doku_Plugin_Controller extends \dokuwiki\Extension\PluginController {
3513a7140a1SAndreas Gohr    /** @inheritdoc */
3523a7140a1SAndreas Gohr    public function __construct()
3533a7140a1SAndreas Gohr    {
3543a7140a1SAndreas Gohr        dbg_deprecated(\dokuwiki\Extension\PluginController::class);
3553a7140a1SAndreas Gohr        parent::__construct();
3563a7140a1SAndreas Gohr    }
357dd87735dSAndreas Gohr}
358451969abSMichael Große
359451969abSMichael Große
360451969abSMichael Große/**
361451969abSMichael Große * Class for handling (email) subscriptions
362451969abSMichael Große *
363451969abSMichael Große * @author  Adrian Lang <lang@cosmocode.de>
364451969abSMichael Große * @author  Andreas Gohr <andi@splitbrain.org>
365451969abSMichael Große * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
366451969abSMichael Große *
367451969abSMichael Große * @deprecated 2019-04-22 Use the classes in the \dokuwiki\Subscriptions namespace instead!
368451969abSMichael Große */
369451969abSMichael Großeclass Subscription {
370451969abSMichael Große
371451969abSMichael Große    /**
372451969abSMichael Große     * Check if subscription system is enabled
373451969abSMichael Große     *
374451969abSMichael Große     * @return bool
375451969abSMichael Große     *
376451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::isenabled
377451969abSMichael Große     */
378451969abSMichael Große    public function isenabled() {
379451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::isenabled');
380451969abSMichael Große        $subscriberManager = new SubscriberManager();
381451969abSMichael Große        return $subscriberManager->isenabled();
382451969abSMichael Große    }
383451969abSMichael Große
384451969abSMichael Große    /**
385451969abSMichael Große     * Recursively search for matching subscriptions
386451969abSMichael Große     *
387451969abSMichael Große     * This function searches all relevant subscription files for a page or
388451969abSMichael Große     * namespace.
389451969abSMichael Große     *
390451969abSMichael Große     * @author Adrian Lang <lang@cosmocode.de>
391451969abSMichael Große     *
392451969abSMichael Große     * @param string         $page The target object’s (namespace or page) id
393451969abSMichael Große     * @param string|array   $user
394451969abSMichael Große     * @param string|array   $style
395451969abSMichael Große     * @param string|array   $data
396451969abSMichael Große     * @return array
397451969abSMichael Große     *
398451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::subscribers
399451969abSMichael Große     */
400451969abSMichael Große    public function subscribers($page, $user = null, $style = null, $data = null) {
401451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::subscribers');
402451969abSMichael Große        $manager = new SubscriberManager();
403451969abSMichael Große        return $manager->subscribers($page, $user, $style, $data);
404451969abSMichael Große    }
405451969abSMichael Große
406451969abSMichael Große    /**
407451969abSMichael Große     * Adds a new subscription for the given page or namespace
408451969abSMichael Große     *
409451969abSMichael Große     * This will automatically overwrite any existent subscription for the given user on this
410451969abSMichael Große     * *exact* page or namespace. It will *not* modify any subscription that may exist in higher namespaces.
411451969abSMichael Große     *
412451969abSMichael Große     * @param string $id The target page or namespace, specified by id; Namespaces
413451969abSMichael Große     *                   are identified by appending a colon.
414451969abSMichael Große     * @param string $user
415451969abSMichael Große     * @param string $style
416451969abSMichael Große     * @param string $data
417451969abSMichael Große     * @throws Exception when user or style is empty
418451969abSMichael Große     * @return bool
419451969abSMichael Große     *
420451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::add
421451969abSMichael Große     */
422451969abSMichael Große    public function add($id, $user, $style, $data = '') {
423451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::add');
424451969abSMichael Große        $manager = new SubscriberManager();
425451969abSMichael Große        return $manager->add($id, $user, $style, $data);
426451969abSMichael Große    }
427451969abSMichael Große
428451969abSMichael Große    /**
429451969abSMichael Große     * Removes a subscription for the given page or namespace
430451969abSMichael Große     *
431451969abSMichael Große     * This removes all subscriptions matching the given criteria on the given page or
432451969abSMichael Große     * namespace. It will *not* modify any subscriptions that may exist in higher
433451969abSMichael Große     * namespaces.
434451969abSMichael Große     *
435451969abSMichael Große     * @param string         $id   The target object’s (namespace or page) id
436451969abSMichael Große     * @param string|array   $user
437451969abSMichael Große     * @param string|array   $style
438451969abSMichael Große     * @param string|array   $data
439451969abSMichael Große     * @return bool
440451969abSMichael Große     *
441451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::remove
442451969abSMichael Große     */
443451969abSMichael Große    public function remove($id, $user = null, $style = null, $data = null) {
444451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::remove');
445451969abSMichael Große        $manager = new SubscriberManager();
446451969abSMichael Große        return $manager->remove($id, $user, $style, $data);
447451969abSMichael Große    }
448451969abSMichael Große
449451969abSMichael Große    /**
450451969abSMichael Große     * Get data for $INFO['subscribed']
451451969abSMichael Große     *
452451969abSMichael Große     * $INFO['subscribed'] is either false if no subscription for the current page
453451969abSMichael Große     * and user is in effect. Else it contains an array of arrays with the fields
454451969abSMichael Große     * “target”, “style”, and optionally “data”.
455451969abSMichael Große     *
456451969abSMichael Große     * @param string $id  Page ID, defaults to global $ID
457451969abSMichael Große     * @param string $user User, defaults to $_SERVER['REMOTE_USER']
458451969abSMichael Große     * @return array|false
459451969abSMichael Große     * @author Adrian Lang <lang@cosmocode.de>
460451969abSMichael Große     *
461451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::userSubscription
462451969abSMichael Große     */
463451969abSMichael Große    public function user_subscription($id = '', $user = '') {
464451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::userSubscription');
465451969abSMichael Große        $manager = new SubscriberManager();
466451969abSMichael Große        return $manager->userSubscription($id, $user);
467451969abSMichael Große    }
468451969abSMichael Große
469451969abSMichael Große    /**
470451969abSMichael Große     * Send digest and list subscriptions
471451969abSMichael Große     *
472451969abSMichael Große     * This sends mails to all subscribers that have a subscription for namespaces above
473451969abSMichael Große     * the given page if the needed $conf['subscribe_time'] has passed already.
474451969abSMichael Große     *
475451969abSMichael Große     * This function is called form lib/exe/indexer.php
476451969abSMichael Große     *
477451969abSMichael Große     * @param string $page
478451969abSMichael Große     * @return int number of sent mails
479451969abSMichael Große     *
480451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\BulkSubscriptionSender::sendBulk
481451969abSMichael Große     */
482451969abSMichael Große    public function send_bulk($page) {
483451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\BulkSubscriptionSender::sendBulk');
484451969abSMichael Große        $subscriptionSender = new BulkSubscriptionSender();
485451969abSMichael Große        return $subscriptionSender->sendBulk($page);
486451969abSMichael Große    }
487451969abSMichael Große
488451969abSMichael Große    /**
489451969abSMichael Große     * Send the diff for some page change
490451969abSMichael Große     *
491451969abSMichael Große     * @param string   $subscriber_mail The target mail address
492451969abSMichael Große     * @param string   $template        Mail template ('subscr_digest', 'subscr_single', 'mailtext', ...)
493451969abSMichael Große     * @param string   $id              Page for which the notification is
494451969abSMichael Große     * @param int|null $rev             Old revision if any
495451969abSMichael Große     * @param string   $summary         Change summary if any
496451969abSMichael Große     * @return bool                     true if successfully sent
497451969abSMichael Große     *
498451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\PageSubscriptionSender::sendPageDiff
499451969abSMichael Große     */
500451969abSMichael Große    public function send_diff($subscriber_mail, $template, $id, $rev = null, $summary = '') {
501451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\PageSubscriptionSender::sendPageDiff');
502451969abSMichael Große        $subscriptionSender = new PageSubscriptionSender();
503451969abSMichael Große        return $subscriptionSender->sendPageDiff($subscriber_mail, $template, $id, $rev, $summary);
504451969abSMichael Große    }
505451969abSMichael Große
506451969abSMichael Große    /**
507451969abSMichael Große     * Send the diff for some media change
508451969abSMichael Große     *
509451969abSMichael Große     * @fixme this should embed thumbnails of images in HTML version
510451969abSMichael Große     *
511451969abSMichael Große     * @param string   $subscriber_mail The target mail address
512451969abSMichael Große     * @param string   $template        Mail template ('uploadmail', ...)
513451969abSMichael Große     * @param string   $id              Media file for which the notification is
514451969abSMichael Große     * @param int|bool $rev             Old revision if any
515451969abSMichael Große     *
516451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\MediaSubscriptionSender::sendMediaDiff
517451969abSMichael Große     */
518451969abSMichael Große    public function send_media_diff($subscriber_mail, $template, $id, $rev = false) {
519451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\MediaSubscriptionSender::sendMediaDiff');
520451969abSMichael Große        $subscriptionSender = new MediaSubscriptionSender();
521451969abSMichael Große        return $subscriptionSender->sendMediaDiff($subscriber_mail, $template, $id, $rev);
522451969abSMichael Große    }
523451969abSMichael Große
524451969abSMichael Große    /**
525451969abSMichael Große     * Send a notify mail on new registration
526451969abSMichael Große     *
527451969abSMichael Große     * @author Andreas Gohr <andi@splitbrain.org>
528451969abSMichael Große     *
529451969abSMichael Große     * @param string $login    login name of the new user
530451969abSMichael Große     * @param string $fullname full name of the new user
531451969abSMichael Große     * @param string $email    email address of the new user
532451969abSMichael Große     * @return bool true if a mail was sent
533451969abSMichael Große     *
534451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\RegistrationSubscriptionSender::sendRegister
535451969abSMichael Große     */
536451969abSMichael Große    public function send_register($login, $fullname, $email) {
537451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\RegistrationSubscriptionSender::sendRegister');
538451969abSMichael Große        $subscriptionSender = new RegistrationSubscriptionSender();
539451969abSMichael Große        return $subscriptionSender->sendRegister($login, $fullname, $email);
540451969abSMichael Große    }
541451969abSMichael Große
542451969abSMichael Große
543451969abSMichael Große    /**
544451969abSMichael Große     * Default callback for COMMON_NOTIFY_ADDRESSLIST
545451969abSMichael Große     *
546451969abSMichael Große     * Aggregates all email addresses of user who have subscribed the given page with 'every' style
547451969abSMichael Große     *
548451969abSMichael Große     * @author Steven Danz <steven-danz@kc.rr.com>
549451969abSMichael Große     * @author Adrian Lang <lang@cosmocode.de>
550451969abSMichael Große     *
551451969abSMichael Große     * @todo move the whole functionality into this class, trigger SUBSCRIPTION_NOTIFY_ADDRESSLIST instead,
552451969abSMichael Große     *       use an array for the addresses within it
553451969abSMichael Große     *
554451969abSMichael Große     * @param array &$data Containing the entries:
555451969abSMichael Große     *    - $id (the page id),
556451969abSMichael Große     *    - $self (whether the author should be notified,
557451969abSMichael Große     *    - $addresslist (current email address list)
558451969abSMichael Große     *    - $replacements (array of additional string substitutions, @KEY@ to be replaced by value)
559451969abSMichael Große     *
560451969abSMichael Große     * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::notifyAddresses
561451969abSMichael Große     */
562451969abSMichael Große    public function notifyaddresses(&$data) {
563451969abSMichael Große        DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::notifyAddresses');
564451969abSMichael Große        $manager = new SubscriberManager();
565451969abSMichael Große        $manager->notifyAddresses($data);
566451969abSMichael Große    }
567451969abSMichael Große}
5686225b270SMichael Große
5696225b270SMichael Große/**
5706225b270SMichael Große * @deprecated 2019-12-29 use \dokuwiki\Search\Indexer
5716225b270SMichael Große */
5726225b270SMichael Großeclass Doku_Indexer extends \dokuwiki\Search\Indexer {};
573723f2b49SGerrit Uitslag
574723f2b49SGerrit Uitslag/**
575723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \dokuwiki\Remote\IXR\Client instead!
576723f2b49SGerrit Uitslag */
577723f2b49SGerrit Uitslagclass IXR_Client extends \dokuwiki\Remote\IXR\Client
578723f2b49SGerrit Uitslag{
579723f2b49SGerrit Uitslag    /**
580723f2b49SGerrit Uitslag     * @inheritdoc
581723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
582723f2b49SGerrit Uitslag     */
583723f2b49SGerrit Uitslag    public function __construct($server, $path = false, $port = 80, $timeout = 15, $timeout_io = null)
584723f2b49SGerrit Uitslag    {
585723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(dokuwiki\Remote\IXR\Client::class);
586723f2b49SGerrit Uitslag        parent::__construct($server, $path, $port, $timeout, $timeout_io);
587723f2b49SGerrit Uitslag    }
588723f2b49SGerrit Uitslag}
589723f2b49SGerrit Uitslag/**
590723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Client\ClientMulticall instead!
591723f2b49SGerrit Uitslag */
592723f2b49SGerrit Uitslagclass IXR_ClientMulticall extends \IXR\Client\ClientMulticall
593723f2b49SGerrit Uitslag{
594723f2b49SGerrit Uitslag    /**
595723f2b49SGerrit Uitslag     * @inheritdoc
596723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
597723f2b49SGerrit Uitslag     */
598723f2b49SGerrit Uitslag    public function __construct($server, $path = false, $port = 80)
599723f2b49SGerrit Uitslag    {
600723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Client\ClientMulticall::class);
601723f2b49SGerrit Uitslag        parent::__construct($server, $path, $port);
602723f2b49SGerrit Uitslag    }
603723f2b49SGerrit Uitslag}
604723f2b49SGerrit Uitslag/**
605723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Server\Server instead!
606723f2b49SGerrit Uitslag */
607723f2b49SGerrit Uitslagclass IXR_Server extends \IXR\Server\Server
608723f2b49SGerrit Uitslag{
609723f2b49SGerrit Uitslag    /**
610723f2b49SGerrit Uitslag     * @inheritdoc
611723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
612723f2b49SGerrit Uitslag     */
613723f2b49SGerrit Uitslag    public function __construct($callbacks = false, $data = false, $wait = false)
614723f2b49SGerrit Uitslag    {
615723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Server\Server::class);
616723f2b49SGerrit Uitslag        parent::__construct($callbacks, $data, $wait);
617723f2b49SGerrit Uitslag    }
618723f2b49SGerrit Uitslag}
619723f2b49SGerrit Uitslag/**
620723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Server\IntrospectionServer instead!
621723f2b49SGerrit Uitslag */
622723f2b49SGerrit Uitslagclass IXR_IntrospectionServer extends \IXR\Server\IntrospectionServer
623723f2b49SGerrit Uitslag{
624723f2b49SGerrit Uitslag    /**
625723f2b49SGerrit Uitslag     * @inheritdoc
626723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
627723f2b49SGerrit Uitslag     */
628723f2b49SGerrit Uitslag    public function __construct()
629723f2b49SGerrit Uitslag    {
630723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Server\IntrospectionServer::class);
631723f2b49SGerrit Uitslag        parent::__construct();
632723f2b49SGerrit Uitslag    }
633723f2b49SGerrit Uitslag}
634723f2b49SGerrit Uitslag/**
635723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Request\Request instead!
636723f2b49SGerrit Uitslag */
637723f2b49SGerrit Uitslagclass IXR_Request extends \IXR\Request\Request
638723f2b49SGerrit Uitslag{
639723f2b49SGerrit Uitslag    /**
640723f2b49SGerrit Uitslag     * @inheritdoc
641723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
642723f2b49SGerrit Uitslag     */
643723f2b49SGerrit Uitslag    public function __construct($method, $args)
644723f2b49SGerrit Uitslag    {
645723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Request\Request::class);
646723f2b49SGerrit Uitslag        parent::__construct($method, $args);
647723f2b49SGerrit Uitslag    }
648723f2b49SGerrit Uitslag}
649723f2b49SGerrit Uitslag/**
650723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Message\Message instead!
651723f2b49SGerrit Uitslag */
652723f2b49SGerrit Uitslagclass IXR_Message extends IXR\Message\Message
653723f2b49SGerrit Uitslag{
654723f2b49SGerrit Uitslag    /**
655723f2b49SGerrit Uitslag     * @inheritdoc
656723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
657723f2b49SGerrit Uitslag     */
658723f2b49SGerrit Uitslag    public function __construct($message)
659723f2b49SGerrit Uitslag    {
660723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Message\Message::class);
661723f2b49SGerrit Uitslag        parent::__construct($message);
662723f2b49SGerrit Uitslag    }
663723f2b49SGerrit Uitslag}
664723f2b49SGerrit Uitslag/**
665723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Message\Error instead!
666723f2b49SGerrit Uitslag */
667723f2b49SGerrit Uitslagclass IXR_Error extends \IXR\Message\Error
668723f2b49SGerrit Uitslag{
669723f2b49SGerrit Uitslag    /**
670723f2b49SGerrit Uitslag     * @inheritdoc
671723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
672723f2b49SGerrit Uitslag     */
673723f2b49SGerrit Uitslag    public function __construct($code, $message)
674723f2b49SGerrit Uitslag    {
675723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Message\Error::class);
676723f2b49SGerrit Uitslag        parent::__construct($code, $message);
677723f2b49SGerrit Uitslag    }
678723f2b49SGerrit Uitslag}
679723f2b49SGerrit Uitslag/**
680723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\DataType\Date instead!
681723f2b49SGerrit Uitslag */
682723f2b49SGerrit Uitslagclass IXR_Date extends \IXR\DataType\Date
683723f2b49SGerrit Uitslag{
684723f2b49SGerrit Uitslag    /**
685723f2b49SGerrit Uitslag     * @inheritdoc
686723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
687723f2b49SGerrit Uitslag     */
688723f2b49SGerrit Uitslag    public function __construct($time)
689723f2b49SGerrit Uitslag    {
690723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\DataType\Date::class);
691723f2b49SGerrit Uitslag        parent::__construct($time);
692723f2b49SGerrit Uitslag    }
693723f2b49SGerrit Uitslag}
694723f2b49SGerrit Uitslag/**
695723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\DataType\Base64 instead!
696723f2b49SGerrit Uitslag */
697723f2b49SGerrit Uitslagclass IXR_Base64 extends \IXR\DataType\Base64
698723f2b49SGerrit Uitslag{
699723f2b49SGerrit Uitslag    /**
700723f2b49SGerrit Uitslag     * @inheritdoc
701723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
702723f2b49SGerrit Uitslag     */
703723f2b49SGerrit Uitslag    public function __construct($data)
704723f2b49SGerrit Uitslag    {
705723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\DataType\Base64::class);
706723f2b49SGerrit Uitslag        parent::__construct($data);
707723f2b49SGerrit Uitslag    }
708723f2b49SGerrit Uitslag}
709723f2b49SGerrit Uitslag/**
710723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\DataType\Value instead!
711723f2b49SGerrit Uitslag */
712723f2b49SGerrit Uitslagclass IXR_Value extends \IXR\DataType\Value
713723f2b49SGerrit Uitslag{
714723f2b49SGerrit Uitslag    /**
715723f2b49SGerrit Uitslag     * @inheritdoc
716723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
717723f2b49SGerrit Uitslag     */
718723f2b49SGerrit Uitslag    public function __construct($data, $type = null)
719723f2b49SGerrit Uitslag    {
720723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\DataType\Value::class);
721723f2b49SGerrit Uitslag        parent::__construct($data, $type);
722723f2b49SGerrit Uitslag    }
723723f2b49SGerrit Uitslag}
724723f2b49SGerrit Uitslag
725*f9a94e78SAndreas Gohr/**
726*f9a94e78SAndreas Gohr * print a newline terminated string
727*f9a94e78SAndreas Gohr *
728*f9a94e78SAndreas Gohr * You can give an indention as optional parameter
729*f9a94e78SAndreas Gohr *
730*f9a94e78SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
731*f9a94e78SAndreas Gohr *
732*f9a94e78SAndreas Gohr * @param string $string  line of text
733*f9a94e78SAndreas Gohr * @param int    $indent  number of spaces indention
734*f9a94e78SAndreas Gohr * @deprecated 2023-08-31 use echo instead
735*f9a94e78SAndreas Gohr */
736*f9a94e78SAndreas Gohrfunction ptln($string, $indent = 0)
737*f9a94e78SAndreas Gohr{
738*f9a94e78SAndreas Gohr    DebugHelper::dbgDeprecatedFunction('echo');
739*f9a94e78SAndreas Gohr    echo str_repeat(' ', $indent) . "$string\n";
740*f9a94e78SAndreas Gohr}
741