MediaWiki REL1_33
FakeConverter Class Reference

A fake language variant converter. More...

Collaboration diagram for FakeConverter:

Public Member Functions

 __construct (Language $langobj)
 
 autoConvert ( $text, $variant=false)
 
 autoConvertToAllVariants ( $text)
 
 convert ( $t)
 
 convertCategoryKey ( $key)
 
 convertNamespace ( $ns)
 
 convertTitle ( $t)
 
 convertTo ( $text, $variant)
 
 findVariantLink (&$l, &$n, $ignoreOtherCond=false)
 
 getConvRuleTitle ()
 
 getDefaultVariant ()
 
 getExtraHashOptions ()
 
 getParsedTitle ()
 
 getPreferredVariant ()
 
 getURLVariant ()
 
 getVariantFallbacks ( $variant)
 
 getVariants ()
 
 markNoConversion ( $text, $noParse=false)
 
 translate ( $text, $variant)
 
 updateConversionTable (Title $title)
 
 validateVariant ( $variant=null)
 

Public Attributes

Language $mLang
 

Private Member Functions

 reloadTables ()
 Used by test suites which need to reset the converter state.
 

Detailed Description

A fake language variant converter.

Languages which do not implement variant conversion, for example, English, should return a FakeConverter rather than a LanguageConverter when asked for their converter. The fake converter just returns text unchanged, i.e. it doesn't do any conversion.

See https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter.

Definition at line 34 of file FakeConverter.php.

Constructor & Destructor Documentation

◆ __construct()

FakeConverter::__construct ( Language  $langobj)

Definition at line 40 of file FakeConverter.php.

Member Function Documentation

◆ autoConvert()

FakeConverter::autoConvert (   $text,
  $variant = false 
)

Definition at line 44 of file FakeConverter.php.

◆ autoConvertToAllVariants()

FakeConverter::autoConvertToAllVariants (   $text)

Definition at line 48 of file FakeConverter.php.

◆ convert()

FakeConverter::convert (   $t)

Definition at line 52 of file FakeConverter.php.

References $t.

◆ convertCategoryKey()

FakeConverter::convertCategoryKey (   $key)

Definition at line 114 of file FakeConverter.php.

◆ convertNamespace()

FakeConverter::convertNamespace (   $ns)

Definition at line 68 of file FakeConverter.php.

◆ convertTitle()

FakeConverter::convertTitle (   $t)
Parameters
Title$t
Returns
mixed

Definition at line 64 of file FakeConverter.php.

References $t.

◆ convertTo()

FakeConverter::convertTo (   $text,
  $variant 
)

Definition at line 56 of file FakeConverter.php.

◆ findVariantLink()

FakeConverter::findVariantLink ( $l,
$n,
  $ignoreOtherCond = false 
)

Definition at line 99 of file FakeConverter.php.

◆ getConvRuleTitle()

FakeConverter::getConvRuleTitle ( )

Definition at line 95 of file FakeConverter.php.

◆ getDefaultVariant()

FakeConverter::getDefaultVariant ( )

Definition at line 87 of file FakeConverter.php.

◆ getExtraHashOptions()

FakeConverter::getExtraHashOptions ( )

Definition at line 102 of file FakeConverter.php.

◆ getParsedTitle()

FakeConverter::getParsedTitle ( )

Definition at line 106 of file FakeConverter.php.

◆ getPreferredVariant()

FakeConverter::getPreferredVariant ( )

Definition at line 83 of file FakeConverter.php.

◆ getURLVariant()

FakeConverter::getURLVariant ( )

Definition at line 91 of file FakeConverter.php.

◆ getVariantFallbacks()

FakeConverter::getVariantFallbacks (   $variant)

Definition at line 79 of file FakeConverter.php.

◆ getVariants()

FakeConverter::getVariants ( )
Returns
string[]

Definition at line 75 of file FakeConverter.php.

◆ markNoConversion()

FakeConverter::markNoConversion (   $text,
  $noParse = false 
)

Definition at line 110 of file FakeConverter.php.

◆ reloadTables()

FakeConverter::reloadTables ( )
private

Used by test suites which need to reset the converter state.

Access:\n private

Definition at line 138 of file FakeConverter.php.

◆ translate()

FakeConverter::translate (   $text,
  $variant 
)

Definition at line 126 of file FakeConverter.php.

◆ updateConversionTable()

FakeConverter::updateConversionTable ( Title  $title)

Definition at line 130 of file FakeConverter.php.

◆ validateVariant()

FakeConverter::validateVariant (   $variant = null)

Definition at line 118 of file FakeConverter.php.

Member Data Documentation

◆ $mLang

Language FakeConverter::$mLang

Definition at line 38 of file FakeConverter.php.


The documentation for this class was generated from the following file: