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 */ 11*d443762bSAndreas Gohrclass RemoteAccessDeniedException extends \dokuwiki\Remote\AccessDeniedException 12*d443762bSAndreas Gohr{ 134cdb6842SAndreas Gohr /** @inheritdoc */ 14*d443762bSAndreas Gohr public function __construct($message = "", $code = 0, Throwable $previous = null) 15*d443762bSAndreas 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 */ 26*d443762bSAndreas Gohrclass RemoteException extends \dokuwiki\Remote\RemoteException 27*d443762bSAndreas Gohr{ 284cdb6842SAndreas Gohr /** @inheritdoc */ 29*d443762bSAndreas Gohr public function __construct($message = "", $code = 0, Throwable $previous = null) 30*d443762bSAndreas 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 */ 44*d443762bSAndreas Gohrfunction Doku_Lexer_Escape($str) 45*d443762bSAndreas 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 */ 54*d443762bSAndreas Gohrclass setting extends \dokuwiki\plugin\config\core\Setting\Setting 55*d443762bSAndreas Gohr{ 56a6e1db4aSAndreas Gohr /** @inheritdoc */ 57*d443762bSAndreas Gohr public function __construct($key, array $params = null) 58*d443762bSAndreas 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 */ 68*d443762bSAndreas Gohrclass setting_authtype extends \dokuwiki\plugin\config\core\Setting\SettingAuthtype 69*d443762bSAndreas Gohr{ 70a6e1db4aSAndreas Gohr /** @inheritdoc */ 71*d443762bSAndreas Gohr public function __construct($key, array $params = null) 72*d443762bSAndreas 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 */ 82*d443762bSAndreas Gohrclass setting_string extends \dokuwiki\plugin\config\core\Setting\SettingString 83*d443762bSAndreas Gohr{ 84a6e1db4aSAndreas Gohr /** @inheritdoc */ 85*d443762bSAndreas Gohr public function __construct($key, array $params = null) 86*d443762bSAndreas 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 */ 96*d443762bSAndreas Gohrclass PageChangelog extends \dokuwiki\ChangeLog\PageChangeLog 97*d443762bSAndreas 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 */ 110*d443762bSAndreas Gohrclass MediaChangelog extends \dokuwiki\ChangeLog\MediaChangeLog 111*d443762bSAndreas 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} 119*d443762bSAndreas Gohr 120*d443762bSAndreas Gohr/** Behavior switch for JSON::decode() */ 121*d443762bSAndreas Gohrdefine('JSON_LOOSE_TYPE', 16); 122*d443762bSAndreas Gohr 123*d443762bSAndreas Gohr/** Behavior switch for JSON::decode() */ 124*d443762bSAndreas Gohrdefine('JSON_STRICT_TYPE', 0); 125*d443762bSAndreas Gohr 126*d443762bSAndreas Gohr/** 127*d443762bSAndreas Gohr * Encode/Decode JSON 128*d443762bSAndreas Gohr * @deprecated 2018-07-27 129*d443762bSAndreas Gohr */ 130*d443762bSAndreas Gohrclass JSON 131*d443762bSAndreas Gohr{ 132*d443762bSAndreas Gohr protected $use = 0; 133*d443762bSAndreas Gohr 134*d443762bSAndreas Gohr /** 135*d443762bSAndreas Gohr * @param int $use JSON_*_TYPE flag 136*d443762bSAndreas Gohr * @deprecated 2018-07-27 137*d443762bSAndreas Gohr */ 138*d443762bSAndreas Gohr public function __construct($use = JSON_STRICT_TYPE) 139*d443762bSAndreas Gohr { 140*d443762bSAndreas Gohr $this->use = $use; 141*d443762bSAndreas Gohr } 142*d443762bSAndreas Gohr 143*d443762bSAndreas Gohr /** 144*d443762bSAndreas Gohr * Encode given structure to JSON 145*d443762bSAndreas Gohr * 146*d443762bSAndreas Gohr * @param mixed $var 147*d443762bSAndreas Gohr * @return string 148*d443762bSAndreas Gohr * @deprecated 2018-07-27 149*d443762bSAndreas Gohr */ 150*d443762bSAndreas Gohr public function encode($var) 151*d443762bSAndreas Gohr { 152*d443762bSAndreas Gohr dbg_deprecated('json_encode'); 153*d443762bSAndreas Gohr return json_encode($var); 154*d443762bSAndreas Gohr } 155*d443762bSAndreas Gohr 156*d443762bSAndreas Gohr /** 157*d443762bSAndreas Gohr * Alias for encode() 158*d443762bSAndreas Gohr * @param $var 159*d443762bSAndreas Gohr * @return string 160*d443762bSAndreas Gohr * @deprecated 2018-07-27 161*d443762bSAndreas Gohr */ 162*d443762bSAndreas Gohr public function enc($var) { 163*d443762bSAndreas Gohr return $this->encode($var); 164*d443762bSAndreas Gohr } 165*d443762bSAndreas Gohr 166*d443762bSAndreas Gohr /** 167*d443762bSAndreas Gohr * Decode given string from JSON 168*d443762bSAndreas Gohr * 169*d443762bSAndreas Gohr * @param string $str 170*d443762bSAndreas Gohr * @return mixed 171*d443762bSAndreas Gohr * @deprecated 2018-07-27 172*d443762bSAndreas Gohr */ 173*d443762bSAndreas Gohr public function decode($str) 174*d443762bSAndreas Gohr { 175*d443762bSAndreas Gohr dbg_deprecated('json_encode'); 176*d443762bSAndreas Gohr return json_decode($str, ($this->use == JSON_LOOSE_TYPE)); 177*d443762bSAndreas Gohr } 178*d443762bSAndreas Gohr 179*d443762bSAndreas Gohr /** 180*d443762bSAndreas Gohr * Alias for decode 181*d443762bSAndreas Gohr * 182*d443762bSAndreas Gohr * @param $str 183*d443762bSAndreas Gohr * @return mixed 184*d443762bSAndreas Gohr * @deprecated 2018-07-27 185*d443762bSAndreas Gohr */ 186*d443762bSAndreas Gohr public function dec($str) { 187*d443762bSAndreas Gohr return $this->decode($str); 188*d443762bSAndreas Gohr } 189*d443762bSAndreas Gohr} 190