MediaWiki  REL1_19
ConverterRule Class Reference

Parser for rules of language conversion , parse rules in -{ }- tag. More...

List of all members.

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.

Detailed Description

Parser for rules of language conversion , parse rules in -{ }- tag.

Author:
fdcn <[email protected]>, PhiLiP <[email protected]>

Definition at line 1089 of file LanguageConverter.php.


Constructor & Destructor Documentation

ConverterRule::__construct ( text,
converter 
)

Constructor.

Parameters:
$textString: the text between -{ and }-
$converterLanguageConverter object

Definition at line 1109 of file LanguageConverter.php.


Member Function Documentation

Generate conversion table for all text.

Definition at line 1312 of file LanguageConverter.php.

References getTextInBidtable().

Referenced by parse().

Here is the call graph for this function:

Here is the caller graph for this function:

Get conversion table.

(bidirectional and unidirectional conversion table)

Returns:
array

Definition at line 1510 of file LanguageConverter.php.

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

Returns:
string

Definition at line 1485 of file LanguageConverter.php.

Get conversion flags.

Returns:
array

Definition at line 1526 of file LanguageConverter.php.

ConverterRule::getRuleConvertedStr ( variant) [private]

Parse rules conversion.

Parameters:
$variant
Returns:
string

Definition at line 1273 of file LanguageConverter.php.

References getTextInBidtable().

Referenced by parse().

Here is the call graph for this function:

Here is the caller graph for this function:

Get conversion rules string.

Returns:
string

Definition at line 1518 of file LanguageConverter.php.

Return how deal with conversion rules.

Returns:
string

Definition at line 1501 of file LanguageConverter.php.

Returns:
string

Definition at line 1249 of file LanguageConverter.php.

Referenced by parse().

Here is the caller graph for this function:

Check if variants array in convert array.

Parameters:
$variantsArray or string: variant language code
Returns:
String: translated text

Definition at line 1120 of file LanguageConverter.php.

Referenced by generateConvTable(), and getRuleConvertedStr().

Here is the caller graph for this function:

Get converted title.

Returns:
string

Definition at line 1493 of file LanguageConverter.php.

Todo:
FIXME: code this function :)

Definition at line 1477 of file LanguageConverter.php.

ConverterRule::parse ( variant = null)

Parse rules and flags.

Parameters:
$variantString: variant language code

Definition at line 1370 of file LanguageConverter.php.

References generateConvTable(), getRuleConvertedStr(), getRulesDesc(), parseFlags(), and parseRules().

Here is the call graph for this function:

Parse flags with syntax -{FLAG| ...

}-

Definition at line 1137 of file LanguageConverter.php.

References $f, and StringUtils\explode().

Referenced by parse().

Here is the call graph for this function:

Here is the caller graph for this function:

Generate conversion table.

Definition at line 1200 of file LanguageConverter.php.

Referenced by parse().

Here is the caller graph for this function:


Member Data Documentation

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.


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