Neuron-PHP

Language extends Memcache
in package

Singleton based language dictionary.

Table of Contents

Constants

ID  = 'id'
LANGUAGE  = 'language'
TEXT  = 'text'

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

LANGUAGE

public mixed LANGUAGE = 'language'

Properties

$_memcache

private static mixed $_memcache

Methods

getText()

Gets the current language text for an id.

public getText(mixed $id[, string $language = '' ]) : string
Parameters
$id : mixed
$language : string = ''
Return values
string

instance()

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
bool

serialize()

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
Return values
Memcached

        
On this page

Search results