Debian Codegraph @

includes/deferred/LinksUpdate/TemplateLinksTable.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Deferred\LinksUpdate;
4
5 use LogicException;
6 use MediaWiki\Parser\ParserOutput;
7
8 /**
9 * templatelinks
10 *
11 * @since 1.38
12 */
13 class TemplateLinksTable extends GenericPageLinksTable {
14 public function setParserOutput( ParserOutput $parserOutput ) {
15 $this->newLinks = $parserOutput->getTemplates();
16 }
17
18 protected function getTableName() {
19 return 'templatelinks';
20 }
21
22 protected function getFromField() {
23 return 'tl_from';
24 }
25
26 protected function getNamespaceField() {
27 // @phan-suppress-previous-line PhanPluginNeverReturnMethod
28 throw new LogicException( 'not supported' );
29 }
30
31 protected function getTitleField() {
32 // @phan-suppress-previous-line PhanPluginNeverReturnMethod
33 throw new LogicException( 'not supported' );
34 }
35
36 protected function getFromNamespaceField() {
37 return 'tl_from_namespace';
38 }
39
40 protected function getTargetIdField() {
41 return 'tl_target_id';
42 }
43
44 /**
45 * Normalization stage of the links table (see T222224)
46 * @return int
47 */
48 protected function linksTargetNormalizationStage(): int {
49 return MIGRATION_NEW;
50 }
51 }