eZ Publish  [trunk]
eZShuffleTranslator Class Reference

Translates text by moving characters around. More...

+ Inheritance diagram for eZShuffleTranslator:
+ Collaboration diagram for eZShuffleTranslator:

List of all members.

Public Member Functions

 eZShuffleTranslator ($max_chars=3)
 findMessage ($context, $source, $comment=null)
shuffleText ($text)
 translate ($context, $source, $comment=null)

Public Attributes

 $Messages
 Contains the hash table with cached 1337 translations.

Detailed Description

Translates text by moving characters around.

Definition at line 18 of file ezshuffletranslator.php.


Member Function Documentation

Construct the translator and loads the translation file $file if is set and exists.

Definition at line 23 of file ezshuffletranslator.php.

eZShuffleTranslator::findMessage ( context,
source,
comment = null 
) [virtual]
Returns:
the translation message for $source and $context or null if the key does not exist.

If you know the translation key use findKey() instead.

This function must overridden if isKeyBased() is true.

Implements eZTranslatorHandler.

Definition at line 31 of file ezshuffletranslator.php.

Referenced by translate().

Reorders some of the characters in $text and returns the new text string. The maximum number of reorders is taken from MaxChars.

Definition at line 42 of file ezshuffletranslator.php.

Referenced by findMessage().

eZShuffleTranslator::translate ( context,
source,
comment = null 
) [virtual]
Returns:
the translation string for $source and $context or null if the translation does not exist.
See also:
findMessage, findKey

Implements eZTranslatorHandler.

Definition at line 69 of file ezshuffletranslator.php.


Member Data Documentation

eZShuffleTranslator::$Messages

Contains the hash table with cached 1337 translations.

Definition at line 82 of file ezshuffletranslator.php.


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