PHP 클래스 Phalcon\Translate\Adapter\Redis

상속: extends Phalcon\Translate\Adapter\Base, implements Phalcon\Translate\AdapterInterface
파일 보기 프로젝트 열기: phalcon/incubator 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cache array Local cache.
$language string Language.
$levels integer How much containers to use in Redis for translations. Calculated with 16^$levels.
$redis Redis Redis object.

공개 메소드들

메소드 설명
__construct ( array $options ) Class constructor.
add ( string $translateKey, string $message ) : boolean Adds a translation for given key (No existence check!)
delete ( string $translateKey ) : boolean Deletes a translation for given key (No existence check!)
exists ( string $translateKey ) : boolean
offsetExists ( string $translateKey ) : string
offsetGet ( string $translateKey ) : string
offsetSet ( string $translateKey, string $message ) : string
offsetUnset ( string $translateKey ) : string
query ( string $translateKey, array $placeholders = null ) : string
set ( string $translateKey, string $message ) : boolean Sets (insert or updates) a translation for given key
update ( string $translateKey, string $message ) : boolean Update a translation for given key (No existence check!)

보호된 메소드들

메소드 설명
getLongKey ( string $index ) : string Returns long key for index.
getShortKey ( string $index ) : string Returns short key for index.
loadValueByKey ( string $key ) Loads key from Redis to local cache.

메소드 상세

__construct() 공개 메소드

Class constructor.
public __construct ( array $options )
$options array

add() 공개 메소드

Adds a translation for given key (No existence check!)
public add ( string $translateKey, string $message ) : boolean
$translateKey string
$message string
리턴 boolean

delete() 공개 메소드

Deletes a translation for given key (No existence check!)
public delete ( string $translateKey ) : boolean
$translateKey string
리턴 boolean

exists() 공개 메소드

public exists ( string $translateKey ) : boolean
$translateKey string
리턴 boolean

getLongKey() 보호된 메소드

Returns long key for index.
protected getLongKey ( string $index ) : string
$index string
리턴 string

getShortKey() 보호된 메소드

Returns short key for index.
protected getShortKey ( string $index ) : string
$index string
리턴 string

loadValueByKey() 보호된 메소드

Loads key from Redis to local cache.
protected loadValueByKey ( string $key )
$key string

offsetExists() 공개 메소드

public offsetExists ( string $translateKey ) : string
$translateKey string
리턴 string

offsetGet() 공개 메소드

public offsetGet ( string $translateKey ) : string
$translateKey string
리턴 string

offsetSet() 공개 메소드

public offsetSet ( string $translateKey, string $message ) : string
$translateKey string
$message string
리턴 string

offsetUnset() 공개 메소드

public offsetUnset ( string $translateKey ) : string
$translateKey string
리턴 string

query() 공개 메소드

public query ( string $translateKey, array $placeholders = null ) : string
$translateKey string
$placeholders array
리턴 string

set() 공개 메소드

Sets (insert or updates) a translation for given key
public set ( string $translateKey, string $message ) : boolean
$translateKey string
$message string
리턴 boolean

update() 공개 메소드

Update a translation for given key (No existence check!)
public update ( string $translateKey, string $message ) : boolean
$translateKey string
$message string
리턴 boolean

프로퍼티 상세

$cache 보호되어 있는 프로퍼티

Local cache.
protected array $cache
리턴 array

$language 보호되어 있는 프로퍼티

Language.
protected string $language
리턴 string

$levels 보호되어 있는 프로퍼티

How much containers to use in Redis for translations. Calculated with 16^$levels.
protected int $levels
리턴 integer

$redis 보호되어 있는 프로퍼티

Redis object.
protected Redis,Phalcon\Translate\Adapter $redis
리턴 Redis