xref: /dokuwiki/inc/deprecated.php (revision ccc4c71ca88c25bcefb7f42eb01f0c040487e3a9)
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
54cdb6842SAndreas Gohr */
64cdb6842SAndreas Gohr
74cdb6842SAndreas Gohr/**
84cdb6842SAndreas Gohr * @inheritdoc
94cdb6842SAndreas Gohr * @deprecated 2018-05-07
104cdb6842SAndreas Gohr */
11d443762bSAndreas Gohrclass RemoteAccessDeniedException extends \dokuwiki\Remote\AccessDeniedException
12d443762bSAndreas Gohr{
134cdb6842SAndreas Gohr    /** @inheritdoc */
14d443762bSAndreas Gohr    public function __construct($message = "", $code = 0, Throwable $previous = null)
15d443762bSAndreas Gohr    {
16a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\Remote\AccessDeniedException::class);
174cdb6842SAndreas Gohr        parent::__construct($message, $code, $previous);
184cdb6842SAndreas Gohr    }
194cdb6842SAndreas Gohr
204cdb6842SAndreas Gohr}
214cdb6842SAndreas Gohr
224cdb6842SAndreas Gohr/**
234cdb6842SAndreas Gohr * @inheritdoc
244cdb6842SAndreas Gohr * @deprecated 2018-05-07
254cdb6842SAndreas Gohr */
26d443762bSAndreas Gohrclass RemoteException extends \dokuwiki\Remote\RemoteException
27d443762bSAndreas Gohr{
284cdb6842SAndreas Gohr    /** @inheritdoc */
29d443762bSAndreas Gohr    public function __construct($message = "", $code = 0, Throwable $previous = null)
30d443762bSAndreas Gohr    {
31a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\Remote\RemoteException::class);
324cdb6842SAndreas Gohr        parent::__construct($message, $code, $previous);
334cdb6842SAndreas Gohr    }
344cdb6842SAndreas Gohr
354cdb6842SAndreas Gohr}
364cdb6842SAndreas Gohr
374cdb6842SAndreas Gohr/**
384cdb6842SAndreas Gohr * Escapes regex characters other than (, ) and /
394cdb6842SAndreas Gohr *
404cdb6842SAndreas Gohr * @param string $str
414cdb6842SAndreas Gohr * @return string
424cdb6842SAndreas Gohr * @deprecated 2018-05-04
434cdb6842SAndreas Gohr */
44d443762bSAndreas Gohrfunction Doku_Lexer_Escape($str)
45d443762bSAndreas Gohr{
46a6e1db4aSAndreas Gohr    dbg_deprecated('\\dokuwiki\\Parsing\\Lexer\\Lexer::escape()');
474cdb6842SAndreas Gohr    return \dokuwiki\Parsing\Lexer\Lexer::escape($str);
484cdb6842SAndreas Gohr}
49a6e1db4aSAndreas Gohr
50a6e1db4aSAndreas Gohr/**
51a6e1db4aSAndreas Gohr * @inheritdoc
52a6e1db4aSAndreas Gohr * @deprecated 2018-06-01
53a6e1db4aSAndreas Gohr */
54d443762bSAndreas Gohrclass setting extends \dokuwiki\plugin\config\core\Setting\Setting
55d443762bSAndreas Gohr{
56a6e1db4aSAndreas Gohr    /** @inheritdoc */
57d443762bSAndreas Gohr    public function __construct($key, array $params = null)
58d443762bSAndreas Gohr    {
59a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\Setting::class);
60a6e1db4aSAndreas Gohr        parent::__construct($key, $params);
61a6e1db4aSAndreas Gohr    }
62a6e1db4aSAndreas Gohr}
63a6e1db4aSAndreas Gohr
64a6e1db4aSAndreas Gohr/**
65a6e1db4aSAndreas Gohr * @inheritdoc
66a6e1db4aSAndreas Gohr * @deprecated 2018-06-01
67a6e1db4aSAndreas Gohr */
68d443762bSAndreas Gohrclass setting_authtype extends \dokuwiki\plugin\config\core\Setting\SettingAuthtype
69d443762bSAndreas Gohr{
70a6e1db4aSAndreas Gohr    /** @inheritdoc */
71d443762bSAndreas Gohr    public function __construct($key, array $params = null)
72d443762bSAndreas Gohr    {
73a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingAuthtype::class);
74a6e1db4aSAndreas Gohr        parent::__construct($key, $params);
75a6e1db4aSAndreas Gohr    }
76a6e1db4aSAndreas Gohr}
77a6e1db4aSAndreas Gohr
78a6e1db4aSAndreas Gohr/**
79a6e1db4aSAndreas Gohr * @inheritdoc
80a6e1db4aSAndreas Gohr * @deprecated 2018-06-01
81a6e1db4aSAndreas Gohr */
82d443762bSAndreas Gohrclass setting_string extends \dokuwiki\plugin\config\core\Setting\SettingString
83d443762bSAndreas Gohr{
84a6e1db4aSAndreas Gohr    /** @inheritdoc */
85d443762bSAndreas Gohr    public function __construct($key, array $params = null)
86d443762bSAndreas Gohr    {
87a6e1db4aSAndreas Gohr        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingString::class);
88a6e1db4aSAndreas Gohr        parent::__construct($key, $params);
89a6e1db4aSAndreas Gohr    }
90a6e1db4aSAndreas Gohr}
910c3a5702SAndreas Gohr
920c3a5702SAndreas Gohr/**
930c3a5702SAndreas Gohr * @inheritdoc
940c3a5702SAndreas Gohr * @deprecated 2018-06-15
950c3a5702SAndreas Gohr */
96d443762bSAndreas Gohrclass PageChangelog extends \dokuwiki\ChangeLog\PageChangeLog
97d443762bSAndreas Gohr{
980c3a5702SAndreas Gohr    /** @inheritdoc */
990c3a5702SAndreas Gohr    public function __construct($id, $chunk_size = 8192)
1000c3a5702SAndreas Gohr    {
1010c3a5702SAndreas Gohr        dbg_deprecated(\dokuwiki\ChangeLog\PageChangeLog::class);
1020c3a5702SAndreas Gohr        parent::__construct($id, $chunk_size);
1030c3a5702SAndreas Gohr    }
1040c3a5702SAndreas Gohr}
1050c3a5702SAndreas Gohr
1060c3a5702SAndreas Gohr/**
1070c3a5702SAndreas Gohr * @inheritdoc
1080c3a5702SAndreas Gohr * @deprecated 2018-06-15
1090c3a5702SAndreas Gohr */
110d443762bSAndreas Gohrclass MediaChangelog extends \dokuwiki\ChangeLog\MediaChangeLog
111d443762bSAndreas Gohr{
1120c3a5702SAndreas Gohr    /** @inheritdoc */
1130c3a5702SAndreas Gohr    public function __construct($id, $chunk_size = 8192)
1140c3a5702SAndreas Gohr    {
1150c3a5702SAndreas Gohr        dbg_deprecated(\dokuwiki\ChangeLog\MediaChangeLog::class);
1160c3a5702SAndreas Gohr        parent::__construct($id, $chunk_size);
1170c3a5702SAndreas Gohr    }
1180c3a5702SAndreas Gohr}
119d443762bSAndreas Gohr
120d443762bSAndreas Gohr/** Behavior switch for JSON::decode() */
121d443762bSAndreas Gohrdefine('JSON_LOOSE_TYPE', 16);
122d443762bSAndreas Gohr
123d443762bSAndreas Gohr/** Behavior switch for JSON::decode() */
124d443762bSAndreas Gohrdefine('JSON_STRICT_TYPE', 0);
125d443762bSAndreas Gohr
126d443762bSAndreas Gohr/**
127d443762bSAndreas Gohr * Encode/Decode JSON
128d443762bSAndreas Gohr * @deprecated 2018-07-27
129d443762bSAndreas Gohr */
130d443762bSAndreas Gohrclass JSON
131d443762bSAndreas Gohr{
132d443762bSAndreas Gohr    protected $use = 0;
133d443762bSAndreas Gohr
134d443762bSAndreas Gohr    /**
135d443762bSAndreas Gohr     * @param int $use JSON_*_TYPE flag
136d443762bSAndreas Gohr     * @deprecated  2018-07-27
137d443762bSAndreas Gohr     */
138d443762bSAndreas Gohr    public function __construct($use = JSON_STRICT_TYPE)
139d443762bSAndreas Gohr    {
140d443762bSAndreas Gohr        $this->use = $use;
141d443762bSAndreas Gohr    }
142d443762bSAndreas Gohr
143d443762bSAndreas Gohr    /**
144d443762bSAndreas Gohr     * Encode given structure to JSON
145d443762bSAndreas Gohr     *
146d443762bSAndreas Gohr     * @param mixed $var
147d443762bSAndreas Gohr     * @return string
148d443762bSAndreas Gohr     * @deprecated  2018-07-27
149d443762bSAndreas Gohr     */
150d443762bSAndreas Gohr    public function encode($var)
151d443762bSAndreas Gohr    {
152d443762bSAndreas Gohr        dbg_deprecated('json_encode');
153d443762bSAndreas Gohr        return json_encode($var);
154d443762bSAndreas Gohr    }
155d443762bSAndreas Gohr
156d443762bSAndreas Gohr    /**
157d443762bSAndreas Gohr     * Alias for encode()
158d443762bSAndreas Gohr     * @param $var
159d443762bSAndreas Gohr     * @return string
160d443762bSAndreas Gohr     * @deprecated  2018-07-27
161d443762bSAndreas Gohr     */
162d443762bSAndreas Gohr    public function enc($var) {
163d443762bSAndreas Gohr        return $this->encode($var);
164d443762bSAndreas Gohr    }
165d443762bSAndreas Gohr
166d443762bSAndreas Gohr    /**
167d443762bSAndreas Gohr     * Decode given string from JSON
168d443762bSAndreas Gohr     *
169d443762bSAndreas Gohr     * @param string $str
170d443762bSAndreas Gohr     * @return mixed
171d443762bSAndreas Gohr     * @deprecated  2018-07-27
172d443762bSAndreas Gohr     */
173d443762bSAndreas Gohr    public function decode($str)
174d443762bSAndreas Gohr    {
175d443762bSAndreas Gohr        dbg_deprecated('json_encode');
176d443762bSAndreas Gohr        return json_decode($str, ($this->use == JSON_LOOSE_TYPE));
177d443762bSAndreas Gohr    }
178d443762bSAndreas Gohr
179d443762bSAndreas Gohr    /**
180d443762bSAndreas Gohr     * Alias for decode
181d443762bSAndreas Gohr     *
182d443762bSAndreas Gohr     * @param $str
183d443762bSAndreas Gohr     * @return mixed
184d443762bSAndreas Gohr     * @deprecated  2018-07-27
185d443762bSAndreas Gohr     */
186d443762bSAndreas Gohr    public function dec($str) {
187d443762bSAndreas Gohr        return $this->decode($str);
188d443762bSAndreas Gohr    }
189d443762bSAndreas Gohr}
190*ccc4c71cSAndreas Gohr
191*ccc4c71cSAndreas Gohr/**
192*ccc4c71cSAndreas Gohr * @inheritdoc
193*ccc4c71cSAndreas Gohr * @deprecated 2019-02-19
194*ccc4c71cSAndreas Gohr */
195*ccc4c71cSAndreas Gohrclass Input extends \dokuwiki\Input\Input {
196*ccc4c71cSAndreas Gohr    /**
197*ccc4c71cSAndreas Gohr     * @inheritdoc
198*ccc4c71cSAndreas Gohr     * @deprecated 2019-02-19
199*ccc4c71cSAndreas Gohr     */
200*ccc4c71cSAndreas Gohr    public function __construct()
201*ccc4c71cSAndreas Gohr    {
202*ccc4c71cSAndreas Gohr        dbg_deprecated(\dokuwiki\Input\Input::class);
203*ccc4c71cSAndreas Gohr        parent::__construct();
204*ccc4c71cSAndreas Gohr    }
205*ccc4c71cSAndreas Gohr}
206*ccc4c71cSAndreas Gohr
207*ccc4c71cSAndreas Gohr/**
208*ccc4c71cSAndreas Gohr * @inheritdoc
209*ccc4c71cSAndreas Gohr * @deprecated 2019-02-19
210*ccc4c71cSAndreas Gohr */
211*ccc4c71cSAndreas Gohrclass PostInput extends \dokuwiki\Input\Post {
212*ccc4c71cSAndreas Gohr    /**
213*ccc4c71cSAndreas Gohr     * @inheritdoc
214*ccc4c71cSAndreas Gohr     * @deprecated 2019-02-19
215*ccc4c71cSAndreas Gohr     */
216*ccc4c71cSAndreas Gohr    public function __construct()
217*ccc4c71cSAndreas Gohr    {
218*ccc4c71cSAndreas Gohr        dbg_deprecated(\dokuwiki\Input\Post::class);
219*ccc4c71cSAndreas Gohr        parent::__construct();
220*ccc4c71cSAndreas Gohr    }
221*ccc4c71cSAndreas Gohr}
222*ccc4c71cSAndreas Gohr
223*ccc4c71cSAndreas Gohr/**
224*ccc4c71cSAndreas Gohr * @inheritdoc
225*ccc4c71cSAndreas Gohr * @deprecated 2019-02-19
226*ccc4c71cSAndreas Gohr */
227*ccc4c71cSAndreas Gohrclass GetInput extends \dokuwiki\Input\Get {
228*ccc4c71cSAndreas Gohr    /**
229*ccc4c71cSAndreas Gohr     * @inheritdoc
230*ccc4c71cSAndreas Gohr     * @deprecated 2019-02-19
231*ccc4c71cSAndreas Gohr     */
232*ccc4c71cSAndreas Gohr    public function __construct()
233*ccc4c71cSAndreas Gohr    {
234*ccc4c71cSAndreas Gohr        dbg_deprecated(\dokuwiki\Input\Get::class);
235*ccc4c71cSAndreas Gohr        parent::__construct();
236*ccc4c71cSAndreas Gohr    }
237*ccc4c71cSAndreas Gohr}
238*ccc4c71cSAndreas Gohr
239*ccc4c71cSAndreas Gohr/**
240*ccc4c71cSAndreas Gohr * @inheritdoc
241*ccc4c71cSAndreas Gohr * @deprecated 2019-02-19
242*ccc4c71cSAndreas Gohr */
243*ccc4c71cSAndreas Gohrclass ServerInput extends \dokuwiki\Input\Server {
244*ccc4c71cSAndreas Gohr    /**
245*ccc4c71cSAndreas Gohr     * @inheritdoc
246*ccc4c71cSAndreas Gohr     * @deprecated 2019-02-19
247*ccc4c71cSAndreas Gohr     */
248*ccc4c71cSAndreas Gohr    public function __construct()
249*ccc4c71cSAndreas Gohr    {
250*ccc4c71cSAndreas Gohr        dbg_deprecated(\dokuwiki\Input\Server::class);
251*ccc4c71cSAndreas Gohr        parent::__construct();
252*ccc4c71cSAndreas Gohr    }
253*ccc4c71cSAndreas Gohr}
254