PHP 인터페이스 Bravo3\Orm\Drivers\DriverInterface

상속: extends Bravo3\Orm\Traits\DebugInterface
파일 보기 프로젝트 열기: bravo3/orm 0 사용 예제들

공개 메소드들

메소드 설명
addMultiValueIndex ( string $key, string | array $value ) : void Add one or many values to a list index
addRef ( string $key, Ref $ref ) : void Add a ref to an entity
addSortedIndex ( string $key, mixed $score, string $value ) : void Add or update an item in a sorted index
clearMultiValueIndex ( string $key ) : void Clear all values from a set index
clearRefs ( string $key ) : void Clear all refs from an entity (delete a ref list)
clearSingleValueIndex ( string $key ) : string Clear the value of a key-value index
clearSortedIndex ( string $key ) : void Clear an entire sorted index
delete ( string $key ) : void Delete a primitive document
flush ( ) : void Execute the current unit of work
getMultiValueIndex ( string $key ) : string[] Get a list of all values on a set index
getPreferredKeyScheme ( ) : Bravo3\Orm\KeySchemes\KeySchemeInterface Get the drivers preferred key scheme
getRefs ( string $key ) : Ref[] Get all refs to an entity
getSingleValueIndex ( string $key ) : string | null Get the value of a key-value index
getSortedIndex ( string $key, boolean $reverse = false, integer $start = null, integer $stop = null ) : string[] Get a range of values in a sorted index
getSortedIndexSize ( string $key ) : integer Get the size of a sorted index, without any filters applied
persist ( string $key, SerialisedData $data, integer $ttl = null ) : void Persist some primitive data
purge ( ) : void Purge the current unit of work, clearing any unexecuted commands
removeMultiValueIndex ( string $key, string | array $value ) : void Remove one or more values from a set index
removeRef ( string $key, Ref $ref ) : void Remove a ref from an entity
removeSortedIndex ( string $key, string $value ) : void Remove an item from a sorted index
retrieve ( string $key ) : SerialisedData Retrieve an object
scan ( string $key ) : string[] Scan key-value indices and return the value of all matching keys
setSingleValueIndex ( string $key, string $value ) : void Set a key-value index
validateId ( string $id ) : string[] Checks if a given entity ID is safe for the driver and returns an array of violation messages

메소드 상세

addMultiValueIndex() 공개 메소드

Add one or many values to a list index
public addMultiValueIndex ( string $key, string | array $value ) : void
$key string
$value string | array
리턴 void

addRef() 공개 메소드

Add a ref to an entity
public addRef ( string $key, Ref $ref ) : void
$key string Entity ref key
$ref Bravo3\Orm\Drivers\Common\Ref Reference to add
리턴 void

addSortedIndex() 공개 메소드

Add or update an item in a sorted index
public addSortedIndex ( string $key, mixed $score, string $value ) : void
$key string
$score mixed
$value string
리턴 void

clearMultiValueIndex() 공개 메소드

Clear all values from a set index
public clearMultiValueIndex ( string $key ) : void
$key string
리턴 void

clearRefs() 공개 메소드

Clear all refs from an entity (delete a ref list)
public clearRefs ( string $key ) : void
$key string
리턴 void

clearSingleValueIndex() 공개 메소드

Clear the value of a key-value index
public clearSingleValueIndex ( string $key ) : string
$key string
리턴 string

clearSortedIndex() 공개 메소드

Clear an entire sorted index
public clearSortedIndex ( string $key ) : void
$key string
리턴 void

delete() 공개 메소드

Delete a primitive document
public delete ( string $key ) : void
$key string
리턴 void

flush() 공개 메소드

Execute the current unit of work
public flush ( ) : void
리턴 void

getMultiValueIndex() 공개 메소드

If the key does not exist, an empty array should be returned.
public getMultiValueIndex ( string $key ) : string[]
$key string
리턴 string[]

getPreferredKeyScheme() 공개 메소드

Get the drivers preferred key scheme
public getPreferredKeyScheme ( ) : Bravo3\Orm\KeySchemes\KeySchemeInterface
리턴 Bravo3\Orm\KeySchemes\KeySchemeInterface

getRefs() 공개 메소드

Get all refs to an entity
public getRefs ( string $key ) : Ref[]
$key string Entity ref key
리턴 Bravo3\Orm\Drivers\Common\Ref[]

getSingleValueIndex() 공개 메소드

If the key does not exist, null should be returned.
public getSingleValueIndex ( string $key ) : string | null
$key string
리턴 string | null

getSortedIndex() 공개 메소드

If $start/$stop are === null, they are assumed to be the start/end of the entire set.
public getSortedIndex ( string $key, boolean $reverse = false, integer $start = null, integer $stop = null ) : string[]
$key string
$reverse boolean
$start integer
$stop integer
리턴 string[]

getSortedIndexSize() 공개 메소드

Get the size of a sorted index, without any filters applied
public getSortedIndexSize ( string $key ) : integer
$key string
리턴 integer

persist() 공개 메소드

Persist some primitive data
public persist ( string $key, SerialisedData $data, integer $ttl = null ) : void
$key string
$data Bravo3\Orm\Drivers\Common\SerialisedData
$ttl integer
리턴 void

purge() 공개 메소드

Purge the current unit of work, clearing any unexecuted commands
public purge ( ) : void
리턴 void

removeMultiValueIndex() 공개 메소드

Remove one or more values from a set index
public removeMultiValueIndex ( string $key, string | array $value ) : void
$key string
$value string | array
리턴 void

removeRef() 공개 메소드

If the reference does not exist, no action is taken.
public removeRef ( string $key, Ref $ref ) : void
$key string Entity ref key
$ref Bravo3\Orm\Drivers\Common\Ref Reference to remove
리턴 void

removeSortedIndex() 공개 메소드

Remove an item from a sorted index
public removeSortedIndex ( string $key, string $value ) : void
$key string
$value string
리턴 void

retrieve() 공개 메소드

Retrieve an object
public retrieve ( string $key ) : SerialisedData
$key string
리턴 Bravo3\Orm\Drivers\Common\SerialisedData

scan() 공개 메소드

Scan key-value indices and return the value of all matching keys
public scan ( string $key ) : string[]
$key string
리턴 string[]

setSingleValueIndex() 공개 메소드

Set a key-value index
public setSingleValueIndex ( string $key, string $value ) : void
$key string
$value string
리턴 void

validateId() 공개 메소드

The ID should be considered valid if the returned array is empty.
public validateId ( string $id ) : string[]
$id string
리턴 string[]