You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

741 lines
21 KiB

  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. * Note: when adding to this file, please also add appropriate actions to _test/rector.php
  7. */
  8. use dokuwiki\Debug\DebugHelper;
  9. use dokuwiki\Subscriptions\BulkSubscriptionSender;
  10. use dokuwiki\Subscriptions\MediaSubscriptionSender;
  11. use dokuwiki\Subscriptions\PageSubscriptionSender;
  12. use dokuwiki\Subscriptions\RegistrationSubscriptionSender;
  13. use dokuwiki\Subscriptions\SubscriberManager;
  14. /**
  15. * @inheritdoc
  16. * @deprecated 2018-05-07
  17. */
  18. class RemoteAccessDeniedException extends \dokuwiki\Remote\AccessDeniedException
  19. {
  20. /** @inheritdoc */
  21. public function __construct($message = "", $code = 0, Throwable $previous = null)
  22. {
  23. dbg_deprecated(\dokuwiki\Remote\AccessDeniedException::class);
  24. parent::__construct($message, $code, $previous);
  25. }
  26. }
  27. /**
  28. * @inheritdoc
  29. * @deprecated 2018-05-07
  30. */
  31. class RemoteException extends \dokuwiki\Remote\RemoteException
  32. {
  33. /** @inheritdoc */
  34. public function __construct($message = "", $code = 0, Throwable $previous = null)
  35. {
  36. dbg_deprecated(\dokuwiki\Remote\RemoteException::class);
  37. parent::__construct($message, $code, $previous);
  38. }
  39. }
  40. /**
  41. * Escapes regex characters other than (, ) and /
  42. *
  43. * @param string $str
  44. * @return string
  45. * @deprecated 2018-05-04
  46. */
  47. function Doku_Lexer_Escape($str)
  48. {
  49. dbg_deprecated('\\dokuwiki\\Parsing\\Lexer\\Lexer::escape()');
  50. return \dokuwiki\Parsing\Lexer\Lexer::escape($str);
  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. * @inheritdoc
  67. * @deprecated 2018-06-01
  68. */
  69. class setting_authtype extends \dokuwiki\plugin\config\core\Setting\SettingAuthtype
  70. {
  71. /** @inheritdoc */
  72. public function __construct($key, array $params = null)
  73. {
  74. dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingAuthtype::class);
  75. parent::__construct($key, $params);
  76. }
  77. }
  78. /**
  79. * @inheritdoc
  80. * @deprecated 2018-06-01
  81. */
  82. class setting_string extends \dokuwiki\plugin\config\core\Setting\SettingString
  83. {
  84. /** @inheritdoc */
  85. public function __construct($key, array $params = null)
  86. {
  87. dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingString::class);
  88. parent::__construct($key, $params);
  89. }
  90. }
  91. /**
  92. * @inheritdoc
  93. * @deprecated 2018-06-15
  94. */
  95. class PageChangelog extends \dokuwiki\ChangeLog\PageChangeLog
  96. {
  97. /** @inheritdoc */
  98. public function __construct($id, $chunk_size = 8192)
  99. {
  100. dbg_deprecated(\dokuwiki\ChangeLog\PageChangeLog::class);
  101. parent::__construct($id, $chunk_size);
  102. }
  103. }
  104. /**
  105. * @inheritdoc
  106. * @deprecated 2018-06-15
  107. */
  108. class MediaChangelog extends \dokuwiki\ChangeLog\MediaChangeLog
  109. {
  110. /** @inheritdoc */
  111. public function __construct($id, $chunk_size = 8192)
  112. {
  113. dbg_deprecated(\dokuwiki\ChangeLog\MediaChangeLog::class);
  114. parent::__construct($id, $chunk_size);
  115. }
  116. }
  117. /** Behavior switch for JSON::decode() */
  118. define('JSON_LOOSE_TYPE', 16);
  119. /** Behavior switch for JSON::decode() */
  120. define('JSON_STRICT_TYPE', 0);
  121. /**
  122. * Encode/Decode JSON
  123. * @deprecated 2018-07-27
  124. */
  125. class JSON
  126. {
  127. protected $use = 0;
  128. /**
  129. * @param int $use JSON_*_TYPE flag
  130. * @deprecated 2018-07-27
  131. */
  132. public function __construct($use = JSON_STRICT_TYPE)
  133. {
  134. $this->use = $use;
  135. }
  136. /**
  137. * Encode given structure to JSON
  138. *
  139. * @param mixed $var
  140. * @return string
  141. * @deprecated 2018-07-27
  142. */
  143. public function encode($var)
  144. {
  145. dbg_deprecated('json_encode');
  146. return json_encode($var);
  147. }
  148. /**
  149. * Alias for encode()
  150. * @param $var
  151. * @return string
  152. * @deprecated 2018-07-27
  153. */
  154. public function enc($var) {
  155. return $this->encode($var);
  156. }
  157. /**
  158. * Decode given string from JSON
  159. *
  160. * @param string $str
  161. * @return mixed
  162. * @deprecated 2018-07-27
  163. */
  164. public function decode($str)
  165. {
  166. dbg_deprecated('json_encode');
  167. return json_decode($str, ($this->use == JSON_LOOSE_TYPE));
  168. }
  169. /**
  170. * Alias for decode
  171. *
  172. * @param $str
  173. * @return mixed
  174. * @deprecated 2018-07-27
  175. */
  176. public function dec($str) {
  177. return $this->decode($str);
  178. }
  179. }
  180. /**
  181. * @inheritdoc
  182. * @deprecated 2019-02-19
  183. */
  184. class Input extends \dokuwiki\Input\Input {
  185. /**
  186. * @inheritdoc
  187. * @deprecated 2019-02-19
  188. */
  189. public function __construct()
  190. {
  191. dbg_deprecated(\dokuwiki\Input\Input::class);
  192. parent::__construct();
  193. }
  194. }
  195. /**
  196. * @inheritdoc
  197. * @deprecated 2019-02-19
  198. */
  199. class PostInput extends \dokuwiki\Input\Post {
  200. /**
  201. * @inheritdoc
  202. * @deprecated 2019-02-19
  203. */
  204. public function __construct()
  205. {
  206. dbg_deprecated(\dokuwiki\Input\Post::class);
  207. parent::__construct();
  208. }
  209. }
  210. /**
  211. * @inheritdoc
  212. * @deprecated 2019-02-19
  213. */
  214. class GetInput extends \dokuwiki\Input\Get {
  215. /**
  216. * @inheritdoc
  217. * @deprecated 2019-02-19
  218. */
  219. public function __construct()
  220. {
  221. dbg_deprecated(\dokuwiki\Input\Get::class);
  222. parent::__construct();
  223. }
  224. }
  225. /**
  226. * @inheritdoc
  227. * @deprecated 2019-02-19
  228. */
  229. class ServerInput extends \dokuwiki\Input\Server {
  230. /**
  231. * @inheritdoc
  232. * @deprecated 2019-02-19
  233. */
  234. public function __construct()
  235. {
  236. dbg_deprecated(\dokuwiki\Input\Server::class);
  237. parent::__construct();
  238. }
  239. }
  240. /**
  241. * @inheritdoc
  242. * @deprecated 2019-03-06
  243. */
  244. class PassHash extends \dokuwiki\PassHash {
  245. /**
  246. * @inheritdoc
  247. * @deprecated 2019-03-06
  248. */
  249. public function __construct()
  250. {
  251. dbg_deprecated(\dokuwiki\PassHash::class);
  252. }
  253. }
  254. /**
  255. * @deprecated since 2019-03-17 use \dokuwiki\HTTP\HTTPClientException instead!
  256. */
  257. class HTTPClientException extends \dokuwiki\HTTP\HTTPClientException {
  258. /**
  259. * @inheritdoc
  260. * @deprecated 2019-03-17
  261. */
  262. public function __construct($message = '', $code = 0, $previous = null)
  263. {
  264. DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\HTTPClientException::class);
  265. parent::__construct($message, $code, $previous);
  266. }
  267. }
  268. /**
  269. * @deprecated since 2019-03-17 use \dokuwiki\HTTP\HTTPClient instead!
  270. */
  271. class HTTPClient extends \dokuwiki\HTTP\HTTPClient {
  272. /**
  273. * @inheritdoc
  274. * @deprecated 2019-03-17
  275. */
  276. public function __construct()
  277. {
  278. DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\HTTPClient::class);
  279. parent::__construct();
  280. }
  281. }
  282. /**
  283. * @deprecated since 2019-03-17 use \dokuwiki\HTTP\DokuHTTPClient instead!
  284. */
  285. class DokuHTTPClient extends \dokuwiki\HTTP\DokuHTTPClient
  286. {
  287. /**
  288. * @inheritdoc
  289. * @deprecated 2019-03-17
  290. */
  291. public function __construct()
  292. {
  293. DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\DokuHTTPClient::class);
  294. parent::__construct();
  295. }
  296. }
  297. /**
  298. * function wrapper to process (create, trigger and destroy) an event
  299. *
  300. * @param string $name name for the event
  301. * @param mixed $data event data
  302. * @param callback $action (optional, default=NULL) default action, a php callback function
  303. * @param bool $canPreventDefault (optional, default=true) can hooks prevent the default action
  304. *
  305. * @return mixed the event results value after all event processing is complete
  306. * by default this is the return value of the default action however
  307. * it can be set or modified by event handler hooks
  308. * @deprecated 2018-06-15
  309. */
  310. function trigger_event($name, &$data, $action=null, $canPreventDefault=true) {
  311. dbg_deprecated('\dokuwiki\Extension\Event::createAndTrigger');
  312. return \dokuwiki\Extension\Event::createAndTrigger($name, $data, $action, $canPreventDefault);
  313. }
  314. /**
  315. * @inheritdoc
  316. * @deprecated 2018-06-15
  317. */
  318. class Doku_Plugin_Controller extends \dokuwiki\Extension\PluginController {
  319. /** @inheritdoc */
  320. public function __construct()
  321. {
  322. dbg_deprecated(\dokuwiki\Extension\PluginController::class);
  323. parent::__construct();
  324. }
  325. }
  326. /**
  327. * Class for handling (email) subscriptions
  328. *
  329. * @author Adrian Lang <lang@cosmocode.de>
  330. * @author Andreas Gohr <andi@splitbrain.org>
  331. * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
  332. *
  333. * @deprecated 2019-04-22 Use the classes in the \dokuwiki\Subscriptions namespace instead!
  334. */
  335. class Subscription {
  336. /**
  337. * Check if subscription system is enabled
  338. *
  339. * @return bool
  340. *
  341. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::isenabled
  342. */
  343. public function isenabled() {
  344. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::isenabled');
  345. $subscriberManager = new SubscriberManager();
  346. return $subscriberManager->isenabled();
  347. }
  348. /**
  349. * Recursively search for matching subscriptions
  350. *
  351. * This function searches all relevant subscription files for a page or
  352. * namespace.
  353. *
  354. * @author Adrian Lang <lang@cosmocode.de>
  355. *
  356. * @param string $page The target object’s (namespace or page) id
  357. * @param string|array $user
  358. * @param string|array $style
  359. * @param string|array $data
  360. * @return array
  361. *
  362. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::subscribers
  363. */
  364. public function subscribers($page, $user = null, $style = null, $data = null) {
  365. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::subscribers');
  366. $manager = new SubscriberManager();
  367. return $manager->subscribers($page, $user, $style, $data);
  368. }
  369. /**
  370. * Adds a new subscription for the given page or namespace
  371. *
  372. * This will automatically overwrite any existent subscription for the given user on this
  373. * *exact* page or namespace. It will *not* modify any subscription that may exist in higher namespaces.
  374. *
  375. * @param string $id The target page or namespace, specified by id; Namespaces
  376. * are identified by appending a colon.
  377. * @param string $user
  378. * @param string $style
  379. * @param string $data
  380. * @throws Exception when user or style is empty
  381. * @return bool
  382. *
  383. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::add
  384. */
  385. public function add($id, $user, $style, $data = '') {
  386. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::add');
  387. $manager = new SubscriberManager();
  388. return $manager->add($id, $user, $style, $data);
  389. }
  390. /**
  391. * Removes a subscription for the given page or namespace
  392. *
  393. * This removes all subscriptions matching the given criteria on the given page or
  394. * namespace. It will *not* modify any subscriptions that may exist in higher
  395. * namespaces.
  396. *
  397. * @param string $id The target object’s (namespace or page) id
  398. * @param string|array $user
  399. * @param string|array $style
  400. * @param string|array $data
  401. * @return bool
  402. *
  403. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::remove
  404. */
  405. public function remove($id, $user = null, $style = null, $data = null) {
  406. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::remove');
  407. $manager = new SubscriberManager();
  408. return $manager->remove($id, $user, $style, $data);
  409. }
  410. /**
  411. * Get data for $INFO['subscribed']
  412. *
  413. * $INFO['subscribed'] is either false if no subscription for the current page
  414. * and user is in effect. Else it contains an array of arrays with the fields
  415. * “target”, “style”, and optionally “data”.
  416. *
  417. * @param string $id Page ID, defaults to global $ID
  418. * @param string $user User, defaults to $_SERVER['REMOTE_USER']
  419. * @return array|false
  420. * @author Adrian Lang <lang@cosmocode.de>
  421. *
  422. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::userSubscription
  423. */
  424. public function user_subscription($id = '', $user = '') {
  425. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::userSubscription');
  426. $manager = new SubscriberManager();
  427. return $manager->userSubscription($id, $user);
  428. }
  429. /**
  430. * Send digest and list subscriptions
  431. *
  432. * This sends mails to all subscribers that have a subscription for namespaces above
  433. * the given page if the needed $conf['subscribe_time'] has passed already.
  434. *
  435. * This function is called form lib/exe/indexer.php
  436. *
  437. * @param string $page
  438. * @return int number of sent mails
  439. *
  440. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\BulkSubscriptionSender::sendBulk
  441. */
  442. public function send_bulk($page) {
  443. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\BulkSubscriptionSender::sendBulk');
  444. $subscriptionSender = new BulkSubscriptionSender();
  445. return $subscriptionSender->sendBulk($page);
  446. }
  447. /**
  448. * Send the diff for some page change
  449. *
  450. * @param string $subscriber_mail The target mail address
  451. * @param string $template Mail template ('subscr_digest', 'subscr_single', 'mailtext', ...)
  452. * @param string $id Page for which the notification is
  453. * @param int|null $rev Old revision if any
  454. * @param string $summary Change summary if any
  455. * @return bool true if successfully sent
  456. *
  457. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\PageSubscriptionSender::sendPageDiff
  458. */
  459. public function send_diff($subscriber_mail, $template, $id, $rev = null, $summary = '') {
  460. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\PageSubscriptionSender::sendPageDiff');
  461. $subscriptionSender = new PageSubscriptionSender();
  462. return $subscriptionSender->sendPageDiff($subscriber_mail, $template, $id, $rev, $summary);
  463. }
  464. /**
  465. * Send the diff for some media change
  466. *
  467. * @fixme this should embed thumbnails of images in HTML version
  468. *
  469. * @param string $subscriber_mail The target mail address
  470. * @param string $template Mail template ('uploadmail', ...)
  471. * @param string $id Media file for which the notification is
  472. * @param int|bool $rev Old revision if any
  473. *
  474. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\MediaSubscriptionSender::sendMediaDiff
  475. */
  476. public function send_media_diff($subscriber_mail, $template, $id, $rev = false) {
  477. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\MediaSubscriptionSender::sendMediaDiff');
  478. $subscriptionSender = new MediaSubscriptionSender();
  479. return $subscriptionSender->sendMediaDiff($subscriber_mail, $template, $id, $rev);
  480. }
  481. /**
  482. * Send a notify mail on new registration
  483. *
  484. * @author Andreas Gohr <andi@splitbrain.org>
  485. *
  486. * @param string $login login name of the new user
  487. * @param string $fullname full name of the new user
  488. * @param string $email email address of the new user
  489. * @return bool true if a mail was sent
  490. *
  491. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\RegistrationSubscriptionSender::sendRegister
  492. */
  493. public function send_register($login, $fullname, $email) {
  494. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\RegistrationSubscriptionSender::sendRegister');
  495. $subscriptionSender = new RegistrationSubscriptionSender();
  496. return $subscriptionSender->sendRegister($login, $fullname, $email);
  497. }
  498. /**
  499. * Default callback for COMMON_NOTIFY_ADDRESSLIST
  500. *
  501. * Aggregates all email addresses of user who have subscribed the given page with 'every' style
  502. *
  503. * @author Steven Danz <steven-danz@kc.rr.com>
  504. * @author Adrian Lang <lang@cosmocode.de>
  505. *
  506. * @todo move the whole functionality into this class, trigger SUBSCRIPTION_NOTIFY_ADDRESSLIST instead,
  507. * use an array for the addresses within it
  508. *
  509. * @param array &$data Containing the entries:
  510. * - $id (the page id),
  511. * - $self (whether the author should be notified,
  512. * - $addresslist (current email address list)
  513. * - $replacements (array of additional string substitutions, @KEY@ to be replaced by value)
  514. *
  515. * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::notifyAddresses
  516. */
  517. public function notifyaddresses(&$data) {
  518. DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::notifyAddresses');
  519. $manager = new SubscriberManager();
  520. $manager->notifyAddresses($data);
  521. }
  522. }
  523. /**
  524. * @deprecated 2019-12-29 use \dokuwiki\Search\Indexer
  525. */
  526. class Doku_Indexer extends \dokuwiki\Search\Indexer {};
  527. /**
  528. * @deprecated since 2021-11-11 use \dokuwiki\Remote\IXR\Client instead!
  529. */
  530. class IXR_Client extends \dokuwiki\Remote\IXR\Client
  531. {
  532. /**
  533. * @inheritdoc
  534. * @deprecated 2021-11-11
  535. */
  536. public function __construct($server, $path = false, $port = 80, $timeout = 15, $timeout_io = null)
  537. {
  538. DebugHelper::dbgDeprecatedFunction(dokuwiki\Remote\IXR\Client::class);
  539. parent::__construct($server, $path, $port, $timeout, $timeout_io);
  540. }
  541. }
  542. /**
  543. * @deprecated since 2021-11-11 use \IXR\Client\ClientMulticall instead!
  544. */
  545. class IXR_ClientMulticall extends \IXR\Client\ClientMulticall
  546. {
  547. /**
  548. * @inheritdoc
  549. * @deprecated 2021-11-11
  550. */
  551. public function __construct($server, $path = false, $port = 80)
  552. {
  553. DebugHelper::dbgDeprecatedFunction(IXR\Client\ClientMulticall::class);
  554. parent::__construct($server, $path, $port);
  555. }
  556. }
  557. /**
  558. * @deprecated since 2021-11-11 use \IXR\Server\Server instead!
  559. */
  560. class IXR_Server extends \IXR\Server\Server
  561. {
  562. /**
  563. * @inheritdoc
  564. * @deprecated 2021-11-11
  565. */
  566. public function __construct($callbacks = false, $data = false, $wait = false)
  567. {
  568. DebugHelper::dbgDeprecatedFunction(IXR\Server\Server::class);
  569. parent::__construct($callbacks, $data, $wait);
  570. }
  571. }
  572. /**
  573. * @deprecated since 2021-11-11 use \IXR\Server\IntrospectionServer instead!
  574. */
  575. class IXR_IntrospectionServer extends \IXR\Server\IntrospectionServer
  576. {
  577. /**
  578. * @inheritdoc
  579. * @deprecated 2021-11-11
  580. */
  581. public function __construct()
  582. {
  583. DebugHelper::dbgDeprecatedFunction(IXR\Server\IntrospectionServer::class);
  584. parent::__construct();
  585. }
  586. }
  587. /**
  588. * @deprecated since 2021-11-11 use \IXR\Request\Request instead!
  589. */
  590. class IXR_Request extends \IXR\Request\Request
  591. {
  592. /**
  593. * @inheritdoc
  594. * @deprecated 2021-11-11
  595. */
  596. public function __construct($method, $args)
  597. {
  598. DebugHelper::dbgDeprecatedFunction(IXR\Request\Request::class);
  599. parent::__construct($method, $args);
  600. }
  601. }
  602. /**
  603. * @deprecated since 2021-11-11 use \IXR\Message\Message instead!
  604. */
  605. class IXR_Message extends IXR\Message\Message
  606. {
  607. /**
  608. * @inheritdoc
  609. * @deprecated 2021-11-11
  610. */
  611. public function __construct($message)
  612. {
  613. DebugHelper::dbgDeprecatedFunction(IXR\Message\Message::class);
  614. parent::__construct($message);
  615. }
  616. }
  617. /**
  618. * @deprecated since 2021-11-11 use \IXR\Message\Error instead!
  619. */
  620. class IXR_Error extends \IXR\Message\Error
  621. {
  622. /**
  623. * @inheritdoc
  624. * @deprecated 2021-11-11
  625. */
  626. public function __construct($code, $message)
  627. {
  628. DebugHelper::dbgDeprecatedFunction(IXR\Message\Error::class);
  629. parent::__construct($code, $message);
  630. }
  631. }
  632. /**
  633. * @deprecated since 2021-11-11 use \IXR\DataType\Date instead!
  634. */
  635. class IXR_Date extends \IXR\DataType\Date
  636. {
  637. /**
  638. * @inheritdoc
  639. * @deprecated 2021-11-11
  640. */
  641. public function __construct($time)
  642. {
  643. DebugHelper::dbgDeprecatedFunction(IXR\DataType\Date::class);
  644. parent::__construct($time);
  645. }
  646. }
  647. /**
  648. * @deprecated since 2021-11-11 use \IXR\DataType\Base64 instead!
  649. */
  650. class IXR_Base64 extends \IXR\DataType\Base64
  651. {
  652. /**
  653. * @inheritdoc
  654. * @deprecated 2021-11-11
  655. */
  656. public function __construct($data)
  657. {
  658. DebugHelper::dbgDeprecatedFunction(IXR\DataType\Base64::class);
  659. parent::__construct($data);
  660. }
  661. }
  662. /**
  663. * @deprecated since 2021-11-11 use \IXR\DataType\Value instead!
  664. */
  665. class IXR_Value extends \IXR\DataType\Value
  666. {
  667. /**
  668. * @inheritdoc
  669. * @deprecated 2021-11-11
  670. */
  671. public function __construct($data, $type = null)
  672. {
  673. DebugHelper::dbgDeprecatedFunction(IXR\DataType\Value::class);
  674. parent::__construct($data, $type);
  675. }
  676. }
  677. /**
  678. * print a newline terminated string
  679. *
  680. * You can give an indention as optional parameter
  681. *
  682. * @author Andreas Gohr <andi@splitbrain.org>
  683. *
  684. * @param string $string line of text
  685. * @param int $indent number of spaces indention
  686. * @deprecated 2023-08-31 use echo instead
  687. */
  688. function ptln($string, $indent = 0)
  689. {
  690. DebugHelper::dbgDeprecatedFunction('echo');
  691. echo str_repeat(' ', $indent) . "$string\n";
  692. }