Zeta Components Manual :: Docs For Class ezcTranslationContextRead
Translation::ezcTranslationContextRead
Interface ezcTranslationContextRead
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):
- <?php
- $r->setOptions( array( 'format' => 'translation-[LOCALE].xml' ) );
- while ( $r->valid() )
- {
- }
- ?>
Source for this file: /Translation/src/interfaces/context_read_interface.php
Iterator | --ezcTranslationContextRead
Version: | //autogentag// |
Method Summary
public void |
deinitReader(
)
Deinitializes the reader. |
public void |
initReader(
$locale
)
Initializes the reader to read from the locale $locale. |
Methods
deinitReader
void
deinitReader(
)
Deinitializes the reader.
This method should be called after the haveMore() method returns false to cleanup resources.
Exceptions:
Type | Description |
---|---|
TranslationException |
when the reader is not initialized with initReader(). |
initReader
void
initReader(
string
$locale
)
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.
Parameters:
Name | Type | Description |
---|---|---|
$locale |
string |
Exceptions:
Type | Description |
---|---|
TranslationException |
when the path of the translation and the fileformat of the translation are not set before this method is called. |
Documentation generated by phpDocumentor 1.4.3