eZPublishCommunityProject(LegacyStack)  2013.9
eZTranslatorGroup Class Referenceabstract

Allows for picking translator handlers according to context. More...

+ Inheritance diagram for eZTranslatorGroup:
+ Collaboration diagram for eZTranslatorGroup:

Public Member Functions

 eZTranslatorGroup ($is_key_based)
 
 findKey ($key)
 
 findMessage ($context, $source, $comment=null)
 
 handlerCount ()
 
 keyPick ($key)
 
 keyTranslate ($key)
 
 pick ($context, $source, $comment)
 
 registerHandler ($handler)
 
 translate ($context, $source, $comment=null)
 
- Public Member Functions inherited from eZTranslatorHandler
 eZTranslatorHandler ($is_key_based)
 
 isKeyBased ()
 

Public Attributes

 $Handlers
 The array of grouped handlers. More...
 
- Public Attributes inherited from eZTranslatorHandler
 $IsKeyBased
 Tells whether the handler is key based or not. More...
 

Detailed Description

Allows for picking translator handlers according to context.

Member Function Documentation

eZTranslatorGroup::eZTranslatorGroup (   $is_key_based)

Constructor

Referenced by eZRandomTranslator\eZRandomTranslator().

eZTranslatorGroup::findKey (   $key)
pure virtual
Returns
the translation message for the key $key or null if the key does not exist.

This function must overridden if isKeyBased() is true.

Implements eZTranslatorHandler.

eZTranslatorGroup::findMessage (   $context,
  $source,
  $comment = null 
)
pure 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.

eZTranslatorGroup::handlerCount ( )
Returns
the number of registered handlers.

Referenced by eZRandomTranslator\keyPick(), and eZRandomTranslator\pick().

eZTranslatorGroup::keyPick (   $key)
pure virtual

Reimplement this to pick one of the registered handlers based on $key.

Returns
-1 for no handler or a number within the handler range (starting from 0).
See Also
pick

Implemented in eZRandomTranslator.

Referenced by findKey(), and keyTranslate().

eZTranslatorGroup::keyTranslate (   $key)
pure virtual
Returns
the translation string for $key or null if the translation does not exist.
See Also
findMessage, findKey

Implements eZTranslatorHandler.

eZTranslatorGroup::pick (   $context,
  $source,
  $comment 
)
pure virtual

Reimplement this to pick one of the registered handlers based on $context, $source and $comment.

Returns
-1 for no handler or a number within the handler range (starting from 0).
See Also
keyPick

Implemented in eZRandomTranslator.

Referenced by findMessage(), and translate().

eZTranslatorGroup::registerHandler (   $handler)

Registers the handler object $handler.

eZTranslatorGroup::translate (   $context,
  $source,
  $comment = null 
)
pure 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

eZTranslatorGroup::$Handlers

The array of grouped handlers.


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