PHP 클래스 Jyxo\Spl\ObjectCache

Example: $key = 'User_Friends/' . $user->username(); return \Jyxo\Spl\ObjectCache::get($key) ?: \Jyxo\Spl\ObjectCache::set($key, new \User\Friends($this->context, $user));
저자: Jakub Tománek
상속: implements IteratorAggregate
파일 보기 프로젝트 열기: jyxo/php 1 사용 예제들

공개 메소드들

메소드 설명
__get ( string $key ) : object Returns an object from an own storage.
__isset ( string $key ) : boolean Returns if there's an object with key $key in the storage.
__set ( string $key, object $value ) Saves an object into an own storage.
__unset ( mixed $key ) Deletes an object with key $key from the storage.
clear ( ) : self Clear the whole storage.
get ( string $key ) : object Returns an object from the default storage.
getInstance ( ) : self Returns default storage for static access.
getIterator ( ) : ArrayIterator Returns an iterator.
set ( string $key, object $value ) : object Saves an object into the default storage.

메소드 상세

__get() 공개 메소드

Returns an object from an own storage.
public __get ( string $key ) : object
$key string Object key
리턴 object

__isset() 공개 메소드

Returns if there's an object with key $key in the storage.
public __isset ( string $key ) : boolean
$key string Object key
리턴 boolean

__set() 공개 메소드

Saves an object into an own storage.
public __set ( string $key, object $value )
$key string Object key
$value object Object

__unset() 공개 메소드

Deletes an object with key $key from the storage.
public __unset ( mixed $key )
$key mixed Object key

clear() 공개 메소드

Clear the whole storage.
public clear ( ) : self
리턴 self

get() 공개 정적인 메소드

Returns an object from the default storage.
public static get ( string $key ) : object
$key string Object key
리턴 object

getInstance() 공개 정적인 메소드

Returns default storage for static access.
public static getInstance ( ) : self
리턴 self

getIterator() 공개 메소드

Returns an iterator.

set() 공개 정적인 메소드

Saves an object into the default storage.
public static set ( string $key, object $value ) : object
$key string Object key
$value object Object
리턴 object saved object