Language
extends Memcache
in package
Singleton based language dictionary.
Table of Contents
Constants
Properties
- $_memcache : mixed
- $_text : mixed
Methods
- getInstance() : ISingleton|null
- getText() : string
- Gets the current language text for an id.
- instance() : mixed
- Gets the global object instance.
- invalidate() : void
- Clears the current global object.
- load() : bool
- Loads csv data from a string. Format: language, id, text
- serialize() : void
- Writes the object data to the storage medium.
- setLanguage() : mixed
- Sets the current language in a session variable.
- getMemcache() : Memcached
Constants
ID
public
mixed
ID
= 'id'
LANGUAGE
public
mixed
LANGUAGE
= 'language'
TEXT
public
mixed
TEXT
= 'text'
Properties
$_memcache
private
static mixed
$_memcache
$_text
private
mixed
$_text
Methods
getInstance()
public
static getInstance() : ISingleton|null
Return values
ISingleton|nullgetText()
Gets the current language text for an id.
public
getText(mixed $id[, string $language = '' ]) : string
Parameters
- $id : mixed
- $language : string = ''
Return values
stringinstance()
Gets the global object instance.
public
static instance() : mixed
invalidate()
Clears the current global object.
public
static invalidate() : void
load()
Loads csv data from a string. Format: language, id, text
public
load(mixed $text) : bool
Parameters
- $text : mixed
Return values
boolserialize()
Writes the object data to the storage medium.
public
serialize() : void
setLanguage()
Sets the current language in a session variable.
public
setLanguage(mixed $language) : mixed
Parameters
- $language : mixed
getMemcache()
protected
static getMemcache() : Memcached