PHP 클래스 MatthiasMullie\Scrapbook\Psr6\Repository

New items are created by first get()-ing them from the pool. It would be inefficient to let such a get() immediately query the real cache (because it may not be meant to retrieve real data, but just to set a new value) Instead, every Item returned by get() will be a "placeholder", and once the values are actually needed, this object will be called to go do that (along with every other value that has not yet been resolved, while we're at it)
저자: Matthias Mullie ([email protected])
파일 보기 프로젝트 열기: matthiasmullie/scrapbook 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$resolved Array of resolved items.
$store MatthiasMullie\Scrapbook\KeyValueStore
$unresolved Array of unresolved items.

공개 메소드들

메소드 설명
__construct ( MatthiasMullie\Scrapbook\KeyValueStore $store )
add ( string $unique, string $key ) Add a to-be-resolved cache key.
exists ( string $unique ) : boolean
get ( string $unique ) : mixed | null
remove ( string $unique ) This repository holds the real values for all Item objects. However, if such an item gets garbage collected, there is no point in wasting any more memory storing that value.

보호된 메소드들

메소드 설명
resolve ( ) Resolve all unresolved keys at once.

메소드 상세

__construct() 공개 메소드

public __construct ( MatthiasMullie\Scrapbook\KeyValueStore $store )
$store MatthiasMullie\Scrapbook\KeyValueStore

add() 공개 메소드

Add a to-be-resolved cache key.
public add ( string $unique, string $key )
$unique string
$key string

exists() 공개 메소드

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

get() 공개 메소드

public get ( string $unique ) : mixed | null
$unique string
리턴 mixed | null Value, of null if non-existent

remove() 공개 메소드

In that case, this method can be called to remove those values.
public remove ( string $unique )
$unique string

resolve() 보호된 메소드

Resolve all unresolved keys at once.
protected resolve ( )

프로퍼티 상세

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

Array of resolved items.
protected $resolved

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

protected KeyValueStore,MatthiasMullie\Scrapbook $store
리턴 MatthiasMullie\Scrapbook\KeyValueStore

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

Array of unresolved items.
protected $unresolved