PHP 클래스 Horde_HashTable_Base, horde

저자: Michael Slusarz ([email protected])
상속: implements ArrayAccess, implements Serializable
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_noexist array A list of items known not to exist.
$_params array Configuration parameters.
$_persistent boolean Persistent storage provided by driver?

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor.
__get ( $name )
__set ( $name, $val )
clear ( ) Clear all hash table entries.
delete ( mixed $keys ) : boolean Delete a key(s).
exists ( mixed $keys ) : mixed Do the keys exists?
get ( mixed $keys ) : mixed Get data associated with a key(s).
hkey ( string $key ) : string Add local prefix to beginning of key.
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
serialize ( )
set ( string $key, string $val, array $opts = [] ) : boolean Set the value of a key.
unserialize ( $data )

보호된 메소드들

메소드 설명
_delete ( $keys ) : boolean Delete keys.
_exists ( array $keys ) : array Get data associated with keys.
_get ( array $keys ) : array Get data associated with keys.
_getExists ( mixed $keys, callable $callback ) : mixed Does a get/exists action on a set of keys.
_init ( ) Do initialization.
_set ( string $key, string $val, array $opts ) : boolean Set the value of a key.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters:
  - logger: (Horde_Log_Logger) Logger object.
  - prefix: (string) Prefix to use for key storage.

__get() 공개 메소드

public __get ( $name )

__set() 공개 메소드

public __set ( $name, $val )

_delete() 추상적인 보호된 메소드

Delete keys.
abstract protected _delete ( $keys ) : boolean
리턴 boolean True on success.

_exists() 추상적인 보호된 메소드

Get data associated with keys.
abstract protected _exists ( array $keys ) : array
$keys array An array of keys.
리턴 array Existence check. Values are boolean true/false.

_get() 추상적인 보호된 메소드

Get data associated with keys.
abstract protected _get ( array $keys ) : array
$keys array An array of keys.
리턴 array The retrieved keys. Non-existent keys should return false as the value.

_getExists() 보호된 메소드

Does a get/exists action on a set of keys.
protected _getExists ( mixed $keys, callable $callback ) : mixed
$keys mixed The key or an array of keys.
$callback callable The internal callback action.
리턴 mixed The results.

_init() 보호된 메소드

Do initialization.
protected _init ( )

_set() 추상적인 보호된 메소드

Set the value of a key.
abstract protected _set ( string $key, string $val, array $opts ) : boolean
$key string The key.
$val string The string to store.
$opts array Additional options (see set()).
리턴 boolean True on success.

clear() 추상적인 공개 메소드

Clear all hash table entries.
abstract public clear ( )

delete() 공개 메소드

Delete a key(s).
public delete ( mixed $keys ) : boolean
$keys mixed The key or an array of keys to delete.
리턴 boolean True on success.

exists() 공개 메소드

Do the keys exists?
public exists ( mixed $keys ) : mixed
$keys mixed The key or an array of keys.
리턴 mixed A boolean/array of booleans indicating existence (return type is the type of $keys).

get() 공개 메소드

Get data associated with a key(s).
public get ( mixed $keys ) : mixed
$keys mixed The key or an array of keys.
리턴 mixed The string/array on success (return type is the type of $keys); false value(s) on failure.

hkey() 공개 메소드

Add local prefix to beginning of key.
public hkey ( string $key ) : string
$key string Key name.
리턴 string Hash table key identifier.

offsetExists() 공개 메소드

public offsetExists ( $offset )

offsetGet() 공개 메소드

public offsetGet ( $offset )

offsetSet() 공개 메소드

public offsetSet ( $offset, $value )

offsetUnset() 공개 메소드

public offsetUnset ( $offset )

serialize() 공개 메소드

public serialize ( )

set() 공개 메소드

Set the value of a key.
public set ( string $key, string $val, array $opts = [] ) : boolean
$key string The key.
$val string The string to store.
$opts array Additional options:
  - expire: (integer) Expiration time in seconds.
            DEFAULT: Doesn't expire.
  - replace: (boolean) Replace the value of key. If key doesn't exist,
             returns false.
             DEFAULT: false
리턴 boolean True on success, false on error.

unserialize() 공개 메소드

public unserialize ( $data )

프로퍼티 상세

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

A list of items known not to exist.
protected array $_noexist
리턴 array

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

Configuration parameters.
protected array $_params
리턴 array

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

Persistent storage provided by driver?
protected bool $_persistent
리턴 boolean