Public Member Functions | Static Public Member Functions | Data Fields

Zend_Translate Class Reference

Public Member Functions

 __construct ($adapter, $data, $locale=null, array $options=array())
 setAdapter ($adapter, $data, $locale=null, array $options=array())
 getAdapter ()
 __call ($method, array $options)

Static Public Member Functions

static getCache ()
static setCache (Zend_Cache_Core $cache)
static hasCache ()
static removeCache ()
static clearCache ()

Data Fields

const AN_ARRAY = 'Array'
const AN_CSV = 'Csv'
const AN_GETTEXT = 'Gettext'
const AN_INI = 'Ini'
const AN_QT = 'Qt'
const AN_TBX = 'Tbx'
const AN_TMX = 'Tmx'
const AN_XLIFF = 'Xliff'
const AN_XMLTM = 'XmlTm'
const LOCALE_DIRECTORY = 'directory'
const LOCALE_FILENAME = 'filename'

Detailed Description

Definition at line 34 of file Translate.php.


Constructor & Destructor Documentation

__construct ( adapter,
data,
locale = null,
array $  options = array() 
)

Generates the standard translation object

Parameters:
string$adapterAdapter to use
array$dataTranslation source data for the adapter Depends on the Adapter
string | Zend_Locale$localeOPTIONAL locale to use
array$optionsOPTIONAL options for the adapter
Exceptions:
Zend_Translate_Exception

Definition at line 69 of file Translate.php.


Member Function Documentation

__call ( method,
array $  options 
)

Calls all methods from the adapter

Definition at line 171 of file Translate.php.

static clearCache (  ) [static]

Clears all set cache data

Returns:
void

Definition at line 163 of file Translate.php.

getAdapter (  )

Returns the adapters name and it's options

Returns:
Zend_Translate_Adapter

Definition at line 108 of file Translate.php.

static getCache (  ) [static]

Returns the set cache

Returns:
Zend_Cache_Core The set cache

Definition at line 118 of file Translate.php.

static hasCache (  ) [static]

Returns true when a cache is set

Returns:
boolean

Definition at line 139 of file Translate.php.

static removeCache (  ) [static]

Removes any set cache

Returns:
void

Definition at line 153 of file Translate.php.

setAdapter ( adapter,
data,
locale = null,
array $  options = array() 
)

Sets a new adapter

Parameters:
string$adapterAdapter to use
string | array$dataTranslation data
string | Zend_Locale$localeOPTIONAL locale to use
array$optionsOPTIONAL Options to use
Exceptions:
Zend_Translate_Exception

Definition at line 83 of file Translate.php.

static setCache ( Zend_Cache_Core cache ) [static]

Sets a cache for all instances of Zend_Translate

Parameters:
Zend_Cache_Core$cacheCache to store to
Returns:
void

Definition at line 129 of file Translate.php.


Field Documentation

const AN_ARRAY = 'Array'

Adapter names constants

Definition at line 38 of file Translate.php.


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