Common interface for all context readers.
This interface specifies the methods that a backend should implement if it wants to act as a general purpose translation context reader. It extends on the built-in Iterator interface.
Example (see ezcTranslationTsBackend for a more elaborate example):
Source for this file: /Translation/src/interfaces/context_read_interface.php
Iterator | --ezcTranslationContextRead
Version: | //autogentag// |
public void |
deinitReader(
)
Deinitializes the reader. |
public void |
initReader(
$locale
)
Initializes the reader to read from the locale $locale. |
Deinitializes the reader.
This method should be called after the haveMore() method returns false to cleanup resources.
Type | Description |
---|---|
TranslationException |
when the reader is not initialized with initReader(). |
Initializes the reader to read from the locale $locale.
Before starting to request context through the reader, you should call this method to initialize it.
Name | Type | Description |
---|---|---|
$locale |
string |
Type | Description |
---|---|
TranslationException |
when the path of the translation and the fileformat of the translation are not set before this method is called. |