xref: /dokuwiki/inc/deprecated.php (revision 71096e46fcbfaeaa808667aba794e77fe2780169)
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;
10723f2b49SGerrit Uitslag
11723f2b49SGerrit Uitslag/**
12723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \dokuwiki\Remote\IXR\Client instead!
13723f2b49SGerrit Uitslag */
14723f2b49SGerrit Uitslagclass IXR_Client extends \dokuwiki\Remote\IXR\Client
15723f2b49SGerrit Uitslag{
16723f2b49SGerrit Uitslag    /**
17723f2b49SGerrit Uitslag     * @inheritdoc
18723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
19723f2b49SGerrit Uitslag     */
20723f2b49SGerrit Uitslag    public function __construct($server, $path = false, $port = 80, $timeout = 15, $timeout_io = null)
21723f2b49SGerrit Uitslag    {
22723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(dokuwiki\Remote\IXR\Client::class);
23723f2b49SGerrit Uitslag        parent::__construct($server, $path, $port, $timeout, $timeout_io);
24723f2b49SGerrit Uitslag    }
25723f2b49SGerrit Uitslag}
26723f2b49SGerrit Uitslag/**
27723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Client\ClientMulticall instead!
28723f2b49SGerrit Uitslag */
29723f2b49SGerrit Uitslagclass IXR_ClientMulticall extends \IXR\Client\ClientMulticall
30723f2b49SGerrit Uitslag{
31723f2b49SGerrit Uitslag    /**
32723f2b49SGerrit Uitslag     * @inheritdoc
33723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
34723f2b49SGerrit Uitslag     */
35723f2b49SGerrit Uitslag    public function __construct($server, $path = false, $port = 80)
36723f2b49SGerrit Uitslag    {
37723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Client\ClientMulticall::class);
38723f2b49SGerrit Uitslag        parent::__construct($server, $path, $port);
39723f2b49SGerrit Uitslag    }
40723f2b49SGerrit Uitslag}
41723f2b49SGerrit Uitslag/**
42723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Server\Server instead!
43723f2b49SGerrit Uitslag */
44723f2b49SGerrit Uitslagclass IXR_Server extends \IXR\Server\Server
45723f2b49SGerrit Uitslag{
46723f2b49SGerrit Uitslag    /**
47723f2b49SGerrit Uitslag     * @inheritdoc
48723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
49723f2b49SGerrit Uitslag     */
50723f2b49SGerrit Uitslag    public function __construct($callbacks = false, $data = false, $wait = false)
51723f2b49SGerrit Uitslag    {
52723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Server\Server::class);
53723f2b49SGerrit Uitslag        parent::__construct($callbacks, $data, $wait);
54723f2b49SGerrit Uitslag    }
55723f2b49SGerrit Uitslag}
56723f2b49SGerrit Uitslag/**
57723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Server\IntrospectionServer instead!
58723f2b49SGerrit Uitslag */
59723f2b49SGerrit Uitslagclass IXR_IntrospectionServer extends \IXR\Server\IntrospectionServer
60723f2b49SGerrit Uitslag{
61723f2b49SGerrit Uitslag    /**
62723f2b49SGerrit Uitslag     * @inheritdoc
63723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
64723f2b49SGerrit Uitslag     */
65723f2b49SGerrit Uitslag    public function __construct()
66723f2b49SGerrit Uitslag    {
67723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Server\IntrospectionServer::class);
68723f2b49SGerrit Uitslag        parent::__construct();
69723f2b49SGerrit Uitslag    }
70723f2b49SGerrit Uitslag}
71723f2b49SGerrit Uitslag/**
72723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Request\Request instead!
73723f2b49SGerrit Uitslag */
74723f2b49SGerrit Uitslagclass IXR_Request extends \IXR\Request\Request
75723f2b49SGerrit Uitslag{
76723f2b49SGerrit Uitslag    /**
77723f2b49SGerrit Uitslag     * @inheritdoc
78723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
79723f2b49SGerrit Uitslag     */
80723f2b49SGerrit Uitslag    public function __construct($method, $args)
81723f2b49SGerrit Uitslag    {
82723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Request\Request::class);
83723f2b49SGerrit Uitslag        parent::__construct($method, $args);
84723f2b49SGerrit Uitslag    }
85723f2b49SGerrit Uitslag}
86723f2b49SGerrit Uitslag/**
87723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Message\Message instead!
88723f2b49SGerrit Uitslag */
89723f2b49SGerrit Uitslagclass IXR_Message extends IXR\Message\Message
90723f2b49SGerrit Uitslag{
91723f2b49SGerrit Uitslag    /**
92723f2b49SGerrit Uitslag     * @inheritdoc
93723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
94723f2b49SGerrit Uitslag     */
95723f2b49SGerrit Uitslag    public function __construct($message)
96723f2b49SGerrit Uitslag    {
97723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Message\Message::class);
98723f2b49SGerrit Uitslag        parent::__construct($message);
99723f2b49SGerrit Uitslag    }
100723f2b49SGerrit Uitslag}
101723f2b49SGerrit Uitslag/**
102723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\Message\Error instead!
103723f2b49SGerrit Uitslag */
104723f2b49SGerrit Uitslagclass IXR_Error extends \IXR\Message\Error
105723f2b49SGerrit Uitslag{
106723f2b49SGerrit Uitslag    /**
107723f2b49SGerrit Uitslag     * @inheritdoc
108723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
109723f2b49SGerrit Uitslag     */
110723f2b49SGerrit Uitslag    public function __construct($code, $message)
111723f2b49SGerrit Uitslag    {
112723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\Message\Error::class);
113723f2b49SGerrit Uitslag        parent::__construct($code, $message);
114723f2b49SGerrit Uitslag    }
115723f2b49SGerrit Uitslag}
116723f2b49SGerrit Uitslag/**
117723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\DataType\Date instead!
118723f2b49SGerrit Uitslag */
119723f2b49SGerrit Uitslagclass IXR_Date extends \IXR\DataType\Date
120723f2b49SGerrit Uitslag{
121723f2b49SGerrit Uitslag    /**
122723f2b49SGerrit Uitslag     * @inheritdoc
123723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
124723f2b49SGerrit Uitslag     */
125723f2b49SGerrit Uitslag    public function __construct($time)
126723f2b49SGerrit Uitslag    {
127723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\DataType\Date::class);
128723f2b49SGerrit Uitslag        parent::__construct($time);
129723f2b49SGerrit Uitslag    }
130723f2b49SGerrit Uitslag}
131723f2b49SGerrit Uitslag/**
132723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\DataType\Base64 instead!
133723f2b49SGerrit Uitslag */
134723f2b49SGerrit Uitslagclass IXR_Base64 extends \IXR\DataType\Base64
135723f2b49SGerrit Uitslag{
136723f2b49SGerrit Uitslag    /**
137723f2b49SGerrit Uitslag     * @inheritdoc
138723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
139723f2b49SGerrit Uitslag     */
140723f2b49SGerrit Uitslag    public function __construct($data)
141723f2b49SGerrit Uitslag    {
142723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\DataType\Base64::class);
143723f2b49SGerrit Uitslag        parent::__construct($data);
144723f2b49SGerrit Uitslag    }
145723f2b49SGerrit Uitslag}
146723f2b49SGerrit Uitslag/**
147723f2b49SGerrit Uitslag * @deprecated since 2021-11-11 use \IXR\DataType\Value instead!
148723f2b49SGerrit Uitslag */
149723f2b49SGerrit Uitslagclass IXR_Value extends \IXR\DataType\Value
150723f2b49SGerrit Uitslag{
151723f2b49SGerrit Uitslag    /**
152723f2b49SGerrit Uitslag     * @inheritdoc
153723f2b49SGerrit Uitslag     * @deprecated 2021-11-11
154723f2b49SGerrit Uitslag     */
155723f2b49SGerrit Uitslag    public function __construct($data, $type = null)
156723f2b49SGerrit Uitslag    {
157723f2b49SGerrit Uitslag        DebugHelper::dbgDeprecatedFunction(IXR\DataType\Value::class);
158723f2b49SGerrit Uitslag        parent::__construct($data, $type);
159723f2b49SGerrit Uitslag    }
160723f2b49SGerrit Uitslag}
161723f2b49SGerrit Uitslag
162f9a94e78SAndreas Gohr/**
163c8dd1b9dSAndreas Gohr * returns all available parser syntax modes in correct order
164c8dd1b9dSAndreas Gohr *
165c8dd1b9dSAndreas Gohr * @return array[] with for each plugin the array('sort' => sortnumber, 'mode' => mode string, 'obj'  => plugin object)
166c8dd1b9dSAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
167c8dd1b9dSAndreas Gohr * @deprecated 2026-04-16 use \dokuwiki\Parsing\ModeRegistry::getModes() instead
168c8dd1b9dSAndreas Gohr */
169c8dd1b9dSAndreas Gohrfunction p_get_parsermodes()
170c8dd1b9dSAndreas Gohr{
171c8dd1b9dSAndreas Gohr    DebugHelper::dbgDeprecatedFunction(\dokuwiki\Parsing\ModeRegistry::class . '::getModes()');
172c8dd1b9dSAndreas Gohr    return \dokuwiki\Parsing\ModeRegistry::getInstance()->getModes();
173c8dd1b9dSAndreas Gohr}
174c8dd1b9dSAndreas Gohr
175c8dd1b9dSAndreas Gohr/**
176c8dd1b9dSAndreas Gohr * Callback function for usort
177c8dd1b9dSAndreas Gohr *
178c8dd1b9dSAndreas Gohr * @param array $a
179c8dd1b9dSAndreas Gohr * @param array $b
180c8dd1b9dSAndreas Gohr * @return int $a is lower/equal/higher than $b
181c8dd1b9dSAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
182c8dd1b9dSAndreas Gohr * @deprecated 2026-04-16 use \dokuwiki\Parsing\ModeRegistry::sortModes() instead
183c8dd1b9dSAndreas Gohr */
184c8dd1b9dSAndreas Gohrfunction p_sort_modes($a, $b)
185c8dd1b9dSAndreas Gohr{
186c8dd1b9dSAndreas Gohr    DebugHelper::dbgDeprecatedFunction(\dokuwiki\Parsing\ModeRegistry::class . '::sortModes()');
187c8dd1b9dSAndreas Gohr    return \dokuwiki\Parsing\ModeRegistry::sortModes($a, $b);
188c8dd1b9dSAndreas Gohr}
189c8dd1b9dSAndreas Gohr
190c8dd1b9dSAndreas Gohr/**
191f9a94e78SAndreas Gohr * print a newline terminated string
192f9a94e78SAndreas Gohr *
193f9a94e78SAndreas Gohr * You can give an indention as optional parameter
194f9a94e78SAndreas Gohr *
195f9a94e78SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
196f9a94e78SAndreas Gohr *
197f9a94e78SAndreas Gohr * @param string $string  line of text
198f9a94e78SAndreas Gohr * @param int    $indent  number of spaces indention
199f9a94e78SAndreas Gohr * @deprecated 2023-08-31 use echo instead
200f9a94e78SAndreas Gohr */
201f9a94e78SAndreas Gohrfunction ptln($string, $indent = 0)
202f9a94e78SAndreas Gohr{
203f9a94e78SAndreas Gohr    DebugHelper::dbgDeprecatedFunction('echo');
204f9a94e78SAndreas Gohr    echo str_repeat(' ', $indent) . "$string\n";
205f9a94e78SAndreas Gohr}
206*71096e46SAndreas Gohr
207*71096e46SAndreas Gohr/**
208*71096e46SAndreas Gohr * @deprecated 2026-04-16 use \dokuwiki\Parsing\ParserMode\Media::parseMedia() instead
209*71096e46SAndreas Gohr */
210*71096e46SAndreas Gohrfunction Doku_Handler_Parse_Media($match)
211*71096e46SAndreas Gohr{
212*71096e46SAndreas Gohr    DebugHelper::dbgDeprecatedFunction(\dokuwiki\Parsing\ParserMode\Media::class . '::parseMedia()');
213*71096e46SAndreas Gohr    return \dokuwiki\Parsing\ParserMode\Media::parseMedia($match);
214*71096e46SAndreas Gohr}
215