DummyLinker.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. <?php
  2. /**
  3. * @since 1.18
  4. */
  5. class DummyLinker {
  6. public function link(
  7. $target,
  8. $html = null,
  9. $customAttribs = [],
  10. $query = [],
  11. $options = []
  12. ) {
  13. return Linker::link(
  14. $target,
  15. $html,
  16. $customAttribs,
  17. $query,
  18. $options
  19. );
  20. }
  21. public function linkKnown(
  22. $target,
  23. $html = null,
  24. $customAttribs = [],
  25. $query = [],
  26. $options = [ 'known' ]
  27. ) {
  28. return Linker::linkKnown(
  29. $target,
  30. $html,
  31. $customAttribs,
  32. $query,
  33. $options
  34. );
  35. }
  36. public function makeSelfLinkObj(
  37. $nt,
  38. $html = '',
  39. $query = '',
  40. $trail = '',
  41. $prefix = ''
  42. ) {
  43. return Linker::makeSelfLinkObj(
  44. $nt,
  45. $html,
  46. $query,
  47. $trail,
  48. $prefix
  49. );
  50. }
  51. public function getInvalidTitleDescription(
  52. IContextSource $context,
  53. $namespace,
  54. $title
  55. ) {
  56. return Linker::getInvalidTitleDescription(
  57. $context,
  58. $namespace,
  59. $title
  60. );
  61. }
  62. public function normaliseSpecialPage( Title $title ) {
  63. return Linker::normaliseSpecialPage( $title );
  64. }
  65. public function makeExternalImage( $url, $alt = '' ) {
  66. return Linker::makeExternalImage( $url, $alt );
  67. }
  68. public function makeImageLink(
  69. Parser $parser,
  70. Title $title,
  71. $file,
  72. $frameParams = [],
  73. $handlerParams = [],
  74. $time = false,
  75. $query = "",
  76. $widthOption = null
  77. ) {
  78. return Linker::makeImageLink(
  79. $parser,
  80. $title,
  81. $file,
  82. $frameParams,
  83. $handlerParams,
  84. $time,
  85. $query,
  86. $widthOption
  87. );
  88. }
  89. public function makeThumbLinkObj(
  90. Title $title,
  91. $file,
  92. $label = '',
  93. $alt = '',
  94. $align = 'right',
  95. $params = [],
  96. $framed = false,
  97. $manualthumb = ""
  98. ) {
  99. return Linker::makeThumbLinkObj(
  100. $title,
  101. $file,
  102. $label,
  103. $alt,
  104. $align,
  105. $params,
  106. $framed,
  107. $manualthumb
  108. );
  109. }
  110. public function makeThumbLink2(
  111. Title $title,
  112. $file,
  113. $frameParams = [],
  114. $handlerParams = [],
  115. $time = false,
  116. $query = ""
  117. ) {
  118. return Linker::makeThumbLink2(
  119. $title,
  120. $file,
  121. $frameParams,
  122. $handlerParams,
  123. $time,
  124. $query
  125. );
  126. }
  127. public function processResponsiveImages( $file, $thumb, $hp ) {
  128. Linker::processResponsiveImages(
  129. $file,
  130. $thumb,
  131. $hp
  132. );
  133. }
  134. public function makeBrokenImageLinkObj(
  135. $title,
  136. $label = '',
  137. $query = '',
  138. $unused1 = '',
  139. $unused2 = '',
  140. $time = false
  141. ) {
  142. return Linker::makeBrokenImageLinkObj(
  143. $title,
  144. $label,
  145. $query,
  146. $unused1,
  147. $unused2,
  148. $time
  149. );
  150. }
  151. public function makeMediaLinkObj( $title, $html = '', $time = false ) {
  152. return Linker::makeMediaLinkObj(
  153. $title,
  154. $html,
  155. $time
  156. );
  157. }
  158. public function makeMediaLinkFile( Title $title, $file, $html = '' ) {
  159. return Linker::makeMediaLinkFile(
  160. $title,
  161. $file,
  162. $html
  163. );
  164. }
  165. public function specialLink( $name, $key = '' ) {
  166. return Linker::specialLink( $name, $key );
  167. }
  168. public function makeExternalLink(
  169. $url,
  170. $text,
  171. $escape = true,
  172. $linktype = '',
  173. $attribs = [],
  174. $title = null
  175. ) {
  176. return Linker::makeExternalLink(
  177. $url,
  178. $text,
  179. $escape,
  180. $linktype,
  181. $attribs,
  182. $title
  183. );
  184. }
  185. public function userLink( $userId, $userName, $altUserName = false ) {
  186. return Linker::userLink(
  187. $userId,
  188. $userName,
  189. $altUserName
  190. );
  191. }
  192. public function userToolLinks(
  193. $userId,
  194. $userText,
  195. $redContribsWhenNoEdits = false,
  196. $flags = 0,
  197. $edits = null
  198. ) {
  199. return Linker::userToolLinks(
  200. $userId,
  201. $userText,
  202. $redContribsWhenNoEdits,
  203. $flags,
  204. $edits
  205. );
  206. }
  207. public function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
  208. return Linker::userToolLinksRedContribs(
  209. $userId,
  210. $userText,
  211. $edits
  212. );
  213. }
  214. public function userTalkLink( $userId, $userText ) {
  215. return Linker::userTalkLink( $userId, $userText );
  216. }
  217. public function blockLink( $userId, $userText ) {
  218. return Linker::blockLink( $userId, $userText );
  219. }
  220. public function emailLink( $userId, $userText ) {
  221. return Linker::emailLink( $userId, $userText );
  222. }
  223. public function revUserLink( $rev, $isPublic = false ) {
  224. return Linker::revUserLink( $rev, $isPublic );
  225. }
  226. public function revUserTools( $rev, $isPublic = false ) {
  227. return Linker::revUserTools( $rev, $isPublic );
  228. }
  229. public function formatComment(
  230. $comment,
  231. $title = null,
  232. $local = false,
  233. $wikiId = null
  234. ) {
  235. return Linker::formatComment(
  236. $comment,
  237. $title,
  238. $local,
  239. $wikiId
  240. );
  241. }
  242. public function formatLinksInComment(
  243. $comment,
  244. $title = null,
  245. $local = false,
  246. $wikiId = null
  247. ) {
  248. return Linker::formatLinksInComment(
  249. $comment,
  250. $title,
  251. $local,
  252. $wikiId
  253. );
  254. }
  255. public function makeCommentLink(
  256. Title $title,
  257. $text,
  258. $wikiId = null,
  259. $options = []
  260. ) {
  261. return Linker::makeCommentLink(
  262. $title,
  263. $text,
  264. $wikiId,
  265. $options
  266. );
  267. }
  268. public function normalizeSubpageLink( $contextTitle, $target, &$text ) {
  269. return Linker::normalizeSubpageLink(
  270. $contextTitle,
  271. $target,
  272. $text
  273. );
  274. }
  275. public function commentBlock(
  276. $comment,
  277. $title = null,
  278. $local = false,
  279. $wikiId = null
  280. ) {
  281. return Linker::commentBlock(
  282. $comment,
  283. $title,
  284. $local,
  285. $wikiId
  286. );
  287. }
  288. public function revComment( Revision $rev, $local = false, $isPublic = false ) {
  289. return Linker::revComment( $rev, $local, $isPublic );
  290. }
  291. public function formatRevisionSize( $size ) {
  292. return Linker::formatRevisionSize( $size );
  293. }
  294. public function tocIndent() {
  295. return Linker::tocIndent();
  296. }
  297. public function tocUnindent( $level ) {
  298. return Linker::tocUnindent( $level );
  299. }
  300. public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
  301. return Linker::tocLine(
  302. $anchor,
  303. $tocline,
  304. $tocnumber,
  305. $level,
  306. $sectionIndex
  307. );
  308. }
  309. public function tocLineEnd() {
  310. return Linker::tocLineEnd();
  311. }
  312. public function tocList( $toc, Language $lang = null ) {
  313. return Linker::tocList( $toc, $lang );
  314. }
  315. public function generateTOC( $tree, Language $lang = null ) {
  316. return Linker::generateTOC( $tree, $lang );
  317. }
  318. public function makeHeadline(
  319. $level,
  320. $attribs,
  321. $anchor,
  322. $html,
  323. $link,
  324. $legacyAnchor = false
  325. ) {
  326. return Linker::makeHeadline(
  327. $level,
  328. $attribs,
  329. $anchor,
  330. $html,
  331. $link,
  332. $legacyAnchor
  333. );
  334. }
  335. public function splitTrail( $trail ) {
  336. return Linker::splitTrail( $trail );
  337. }
  338. public function generateRollback(
  339. $rev,
  340. IContextSource $context = null,
  341. $options = [ 'verify' ]
  342. ) {
  343. return Linker::generateRollback(
  344. $rev,
  345. $context,
  346. $options
  347. );
  348. }
  349. public function getRollbackEditCount( $rev, $verify ) {
  350. return Linker::getRollbackEditCount( $rev, $verify );
  351. }
  352. public function buildRollbackLink(
  353. $rev,
  354. IContextSource $context = null,
  355. $editCount = false
  356. ) {
  357. return Linker::buildRollbackLink(
  358. $rev,
  359. $context,
  360. $editCount
  361. );
  362. }
  363. public function formatHiddenCategories( $hiddencats ) {
  364. return Linker::formatHiddenCategories( $hiddencats );
  365. }
  366. public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
  367. return Linker::titleAttrib(
  368. $name,
  369. $options,
  370. $msgParams
  371. );
  372. }
  373. public function accesskey( $name ) {
  374. return Linker::accesskey( $name );
  375. }
  376. public function getRevDeleteLink( User $user, Revision $rev, Title $title ) {
  377. return Linker::getRevDeleteLink(
  378. $user,
  379. $rev,
  380. $title
  381. );
  382. }
  383. public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
  384. return Linker::revDeleteLink(
  385. $query,
  386. $restricted,
  387. $delete
  388. );
  389. }
  390. public function revDeleteLinkDisabled( $delete = true ) {
  391. return Linker::revDeleteLinkDisabled( $delete );
  392. }
  393. public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
  394. return Linker::tooltipAndAccesskeyAttribs(
  395. $name,
  396. $msgParams
  397. );
  398. }
  399. public function tooltip( $name, $options = null ) {
  400. return Linker::tooltip( $name, $options );
  401. }
  402. }