MediaWiki
REL1_19
|
Parser for rules of language conversion , parse rules in -{ }- tag. More...
Public Member Functions | |
__construct ($text, $converter) | |
Constructor. | |
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 () | |
parse ($variant=null) | |
Parse rules and flags. | |
Public Attributes | |
$mBidtable = array() | |
$mConverter | |
$mConvTable = array() | |
$mFlags = array() | |
$mManualCodeError = '<strong class="error">code error!</strong>' | |
$mRuleDisplay = '' | |
$mRules = '' | |
$mRulesAction = 'none' | |
$mRuleTitle = false | |
$mText | |
$mUnidtable = array() | |
$mVariantFlags = array() | |
Private Member Functions | |
generateConvTable () | |
Generate conversion table for all text. | |
getRuleConvertedStr ($variant) | |
Parse rules conversion. | |
getRulesDesc () | |
parseFlags () | |
Parse flags with syntax -{FLAG| ... | |
parseRules () | |
Generate conversion table. |
Parser for rules of language conversion , parse rules in -{ }- tag.
Definition at line 1089 of file LanguageConverter.php.
ConverterRule::__construct | ( | $ | text, |
$ | converter | ||
) |
Constructor.
$text | String: the text between -{ and }- |
$converter | LanguageConverter object |
Definition at line 1109 of file LanguageConverter.php.
ConverterRule::generateConvTable | ( | ) | [private] |
Generate conversion table for all text.
Definition at line 1312 of file LanguageConverter.php.
References getTextInBidtable().
Referenced by parse().
Get conversion table.
(bidirectional and unidirectional conversion table)
Definition at line 1510 of file LanguageConverter.php.
Get display text on markup -{...}-.
Definition at line 1485 of file LanguageConverter.php.
ConverterRule::getRuleConvertedStr | ( | $ | variant | ) | [private] |
Parse rules conversion.
$variant |
Definition at line 1273 of file LanguageConverter.php.
References getTextInBidtable().
Referenced by parse().
Return how deal with conversion rules.
Definition at line 1501 of file LanguageConverter.php.
ConverterRule::getRulesDesc | ( | ) | [private] |
Definition at line 1249 of file LanguageConverter.php.
Referenced by parse().
ConverterRule::getTextInBidtable | ( | $ | variants | ) |
Check if variants array in convert array.
$variants | Array or string: variant language code |
Definition at line 1120 of file LanguageConverter.php.
Referenced by generateConvTable(), and getRuleConvertedStr().
Definition at line 1477 of file LanguageConverter.php.
ConverterRule::parse | ( | $ | variant = null | ) |
Parse rules and flags.
$variant | String: variant language code |
Definition at line 1370 of file LanguageConverter.php.
References generateConvTable(), getRuleConvertedStr(), getRulesDesc(), parseFlags(), and parseRules().
ConverterRule::parseFlags | ( | ) | [private] |
Parse flags with syntax -{FLAG| ...
}-
Definition at line 1137 of file LanguageConverter.php.
References $f, and StringUtils\explode().
Referenced by parse().
ConverterRule::parseRules | ( | ) | [private] |
Generate conversion table.
Definition at line 1200 of file LanguageConverter.php.
Referenced by parse().
ConverterRule::$mBidtable = array() |
Definition at line 1100 of file LanguageConverter.php.
ConverterRule::$mConverter |
Definition at line 1091 of file LanguageConverter.php.
ConverterRule::$mConvTable = array() |
Definition at line 1099 of file LanguageConverter.php.
ConverterRule::$mFlags = array() |
Definition at line 1097 of file LanguageConverter.php.
ConverterRule::$mManualCodeError = '<strong class="error">code error!</strong>' |
Definition at line 1092 of file LanguageConverter.php.
ConverterRule::$mRuleDisplay = '' |
Definition at line 1093 of file LanguageConverter.php.
ConverterRule::$mRules = '' |
Definition at line 1095 of file LanguageConverter.php.
ConverterRule::$mRulesAction = 'none' |
Definition at line 1096 of file LanguageConverter.php.
ConverterRule::$mRuleTitle = false |
Definition at line 1094 of file LanguageConverter.php.
ConverterRule::$mText |
Definition at line 1090 of file LanguageConverter.php.
ConverterRule::$mUnidtable = array() |
Definition at line 1101 of file LanguageConverter.php.
ConverterRule::$mVariantFlags = array() |
Definition at line 1098 of file LanguageConverter.php.