MediaWiki REL1_39
ConverterRule Class Reference

The rules used for language conversion, this processes the rules extracted by Parser from the -{ }- wikitext syntax. More...

Collaboration diagram for ConverterRule:

Public Member Functions

 __construct ( $text, LanguageConverter $converter)
 
 getConvTable ()
 Get conversion table.
 
 getDisplay ()
 Get display text on markup -{...}-.
 
 getFlags ()
 Get conversion flags.
 
 getRules ()
 Get conversion rules string.
 
 getRulesAction ()
 Return how deal with conversion rules.
 
 getTextInBidtable ( $variants)
 Check if variants array in convert array.
 
 getTitle ()
 Get converted title.
 
 hasRules ()
 Checks if there are conversion rules.
 
 parse ( $variant=null)
 Parse rules and flags.
 

Public Attributes

array $mBidtable = []
 of the translation in each variant
 
LanguageConverter $mConverter
 
 $mConvTable = []
 
 $mFlags = []
 
 $mRuleDisplay = ''
 
string $mRules = ''
 the text of the rules
 
 $mRulesAction = 'none'
 
 $mRuleTitle = false
 
string $mText
 original text in -{text}-
 
array $mUnidtable = []
 of the translation in each variant
 
 $mVariantFlags = []
 

Detailed Description

The rules used for language conversion, this processes the rules extracted by Parser from the -{ }- wikitext syntax.

Definition at line 28 of file ConverterRule.php.

Constructor & Destructor Documentation

◆ __construct()

ConverterRule::__construct ( $text,
LanguageConverter $converter )
Parameters
string$textThe text between -{ and }-
LanguageConverter$converter

Definition at line 60 of file ConverterRule.php.

Member Function Documentation

◆ getConvTable()

ConverterRule::getConvTable ( )

Get conversion table.

(bidirectional and unidirectional conversion table)

Returns
array

Definition at line 492 of file ConverterRule.php.

References $mConvTable.

Referenced by LanguageConverter\applyManualConv().

◆ getDisplay()

ConverterRule::getDisplay ( )

Get display text on markup -{...}-.

Returns
string

Definition at line 467 of file ConverterRule.php.

References $mRuleDisplay.

◆ getFlags()

ConverterRule::getFlags ( )

Get conversion flags.

Returns
array

Definition at line 508 of file ConverterRule.php.

References $mFlags.

◆ getRules()

ConverterRule::getRules ( )

Get conversion rules string.

Returns
string

Definition at line 500 of file ConverterRule.php.

References $mRules.

◆ getRulesAction()

ConverterRule::getRulesAction ( )

Return how deal with conversion rules.

Returns
string

Definition at line 483 of file ConverterRule.php.

References $mRulesAction.

Referenced by LanguageConverter\applyManualConv().

◆ getTextInBidtable()

ConverterRule::getTextInBidtable ( $variants)

Check if variants array in convert array.

Parameters
array | string$variantsVariant language code
Returns
string|false Translated text

Definition at line 71 of file ConverterRule.php.

◆ getTitle()

ConverterRule::getTitle ( )

Get converted title.

Returns
string|false

Definition at line 475 of file ConverterRule.php.

References $mRuleTitle.

Referenced by LanguageConverter\applyManualConv().

◆ hasRules()

ConverterRule::hasRules ( )

Checks if there are conversion rules.

Returns
bool

Definition at line 459 of file ConverterRule.php.

◆ parse()

ConverterRule::parse ( $variant = null)

Parse rules and flags.

Parameters
string | null$variantVariant language code

Definition at line 350 of file ConverterRule.php.

References $mFlags, $mRules, true, and wfMessage().

Member Data Documentation

◆ $mBidtable

array ConverterRule::$mBidtable = []

of the translation in each variant

Definition at line 50 of file ConverterRule.php.

◆ $mConverter

LanguageConverter ConverterRule::$mConverter

Definition at line 36 of file ConverterRule.php.

◆ $mConvTable

ConverterRule::$mConvTable = []

Definition at line 46 of file ConverterRule.php.

Referenced by getConvTable().

◆ $mFlags

ConverterRule::$mFlags = []

Definition at line 44 of file ConverterRule.php.

Referenced by getFlags(), and parse().

◆ $mRuleDisplay

ConverterRule::$mRuleDisplay = ''

Definition at line 37 of file ConverterRule.php.

Referenced by getDisplay().

◆ $mRules

string ConverterRule::$mRules = ''

the text of the rules

Definition at line 42 of file ConverterRule.php.

Referenced by getRules(), and parse().

◆ $mRulesAction

ConverterRule::$mRulesAction = 'none'

Definition at line 43 of file ConverterRule.php.

Referenced by getRulesAction().

◆ $mRuleTitle

ConverterRule::$mRuleTitle = false

Definition at line 38 of file ConverterRule.php.

Referenced by getTitle().

◆ $mText

string ConverterRule::$mText

original text in -{text}-

Definition at line 32 of file ConverterRule.php.

◆ $mUnidtable

array ConverterRule::$mUnidtable = []

of the translation in each variant

Definition at line 54 of file ConverterRule.php.

◆ $mVariantFlags

ConverterRule::$mVariantFlags = []

Definition at line 45 of file ConverterRule.php.


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