Translation: ezcTranslationBackend
[ ]
[ Linguist format ]
[ ]
[ ]
[ ]
[ ]
Interface: ezcTranslationBackend
|
Interface for Translation backends. [
source]
This interface describes the methods that a Translation backend should implement.
Method Summary
|
public array |
getContext(
$locale, $context )
Returns an array with translation data for the context $context and the locale $locale. |
|
public void |
setOptions(
$configurationData )
Sets the backend specific $configurationData. |
Methods
getContext
array getContext(
string
$locale, string
$context )
Returns an array with translation data for the context $context and the locale $locale.
This method returns an array describing the map used for translation of text. For the format see ezcTranslation::$translationMap.
Parameters
| Name |
Type |
Description |
$locale |
string |
|
$context |
string |
|
Throws
| Class | Description |
TranslationException |
when a context is not available. |
setOptions
void setOptions(
mixed
$configurationData )
Sets the backend specific $configurationData.
$configurationData should be an implementation of ezcBaseOptions (or, for sake of backwards compatibility an associative array). See
ezcTranslationTsBackend for an example implementation.
Each implementor must document the options that it accepts and throw an ezcBaseConfigException with the ezcBaseConfigException::UNKNOWN_CONFIG_SETTING type if an option is not supported.
Parameters
| Name |
Type |
Description |
$configurationData |
mixed |
|
Last updated: Mon, 10 Nov 2008