Translation: ezcTranslationContextWrite
[ ]
[ Linguist format ]
[ ]
[ ]
[ ]
[ ]
Interface: ezcTranslationContextWrite
|
Common interface for all context writers. [
source]
This interface specifies the methods that a backend should implement if it wants to act as a general purpose translation context writer.
Method Summary
|
public void |
deinitWriter(
)
Deinitializes the writer |
|
public void |
initWriter(
$locale )
Initializes the writer to write from the locale $locale. |
|
public void |
storeContext(
$context, $data )
Stores the context named $context with the data $data. |
Methods
deinitWriter
void deinitWriter(
)
Deinitializes the writer
This method should be called after the last context was written to cleanup resources.
Throws
| Class | Description |
TranslationException |
when the writer is not initialized with initWriter(). |
initWriter
void initWriter(
string
$locale )
Initializes the writer to write from the locale $locale.
Before starting to writer contexts to the writer, you should call this method to initialize it.
Parameters
| Name |
Type |
Description |
$locale |
string |
|
Throws
| Class | Description |
TranslationException |
when the path of the translation and the translation format are not set before this method is called. |
storeContext
void storeContext(
string
$context,
$data )
Stores the context named $context with the data $data.
$data must contain the translations data map. This method stores the context that it received to the backend specified storage place.
Parameters
| Name |
Type |
Description |
$context |
string |
|
$data |
array |
|
Throws
| Class | Description |
TranslationException |
when the writer is not initialized with initWriter(). |
Last updated: Mon, 29 Jun 2009