eZPublish  4.5
eZ1337Translator Class Reference

Translates text into the leet (1337) language. More...

+ Inheritance diagram for eZ1337Translator:
+ Collaboration diagram for eZ1337Translator:

Public Member Functions

 eZ1337Translator ()
 
 findMessage ($context, $source, $comment=null)
 
 leetify ($text)
 
 translate ($context, $source, $comment=null)
 
- Public Member Functions inherited from eZTranslatorHandler
 eZTranslatorHandler ($is_key_based)
 
 findKey ($key)
 
 isKeyBased ()
 
 keyTranslate ($key)
 

Static Public Member Functions

static initialize ()
 

Public Attributes

 $Messages
 Contains the hash table with cached 1337 translations. More...
 
- Public Attributes inherited from eZTranslatorHandler
 $IsKeyBased
 Tells whether the handler is key based or not. More...
 

Detailed Description

Translates text into the leet (1337) language.

It translates the following characters/strings

  • to - 2
  • for - 4
  • ate - 8
  • you - u
  • l - 1
  • e - 3
  • o - 0
  • a - 4
  • t - 7

Member Function Documentation

eZ1337Translator::eZ1337Translator ( )

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

Referenced by initialize().

eZ1337Translator::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.

Referenced by translate().

static eZ1337Translator::initialize ( )
static

Initialize the bork translator if this is not allready done.

eZ1337Translator::leetify (   $text)

Translates the text into 1337 code.

Referenced by findMessage().

eZ1337Translator::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.

Member Data Documentation

eZ1337Translator::$Messages

Contains the hash table with cached 1337 translations.


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