| @@ 497-510 (lines=14) @@ | ||
| 494 | * @return array Array of raw_prefixed_title (string) => prefixed_title (string) |
|
| 495 | * @since 1.21 |
|
| 496 | */ |
|
| 497 | public function getNormalizedTitlesAsResult( $result = null ) { |
|
| 498 | $values = []; |
|
| 499 | foreach ( $this->getNormalizedTitles() as $rawTitleStr => $titleStr ) { |
|
| 500 | $values[] = [ |
|
| 501 | 'from' => $rawTitleStr, |
|
| 502 | 'to' => $titleStr |
|
| 503 | ]; |
|
| 504 | } |
|
| 505 | if ( !empty( $values ) && $result ) { |
|
| 506 | ApiResult::setIndexedTagName( $values, 'n' ); |
|
| 507 | } |
|
| 508 | ||
| 509 | return $values; |
|
| 510 | } |
|
| 511 | ||
| 512 | /** |
|
| 513 | * Get a list of title conversions - maps a title to its converted |
|
| @@ 528-541 (lines=14) @@ | ||
| 525 | * @return array Array of (from, to) strings |
|
| 526 | * @since 1.21 |
|
| 527 | */ |
|
| 528 | public function getConvertedTitlesAsResult( $result = null ) { |
|
| 529 | $values = []; |
|
| 530 | foreach ( $this->getConvertedTitles() as $rawTitleStr => $titleStr ) { |
|
| 531 | $values[] = [ |
|
| 532 | 'from' => $rawTitleStr, |
|
| 533 | 'to' => $titleStr |
|
| 534 | ]; |
|
| 535 | } |
|
| 536 | if ( !empty( $values ) && $result ) { |
|
| 537 | ApiResult::setIndexedTagName( $values, 'c' ); |
|
| 538 | } |
|
| 539 | ||
| 540 | return $values; |
|
| 541 | } |
|
| 542 | ||
| 543 | /** |
|
| 544 | * Get a list of interwiki titles - maps a title to its interwiki |
|