BackendInterface

A persistence backend interface

Table of Contents

Methods

commit()  : mixed
Commits the current persistence session
getIdentifierByObject()  : string|null
Returns the (internal) identifier for the object, if it is known to the backend. Otherwise NULL is returned.
getObjectByIdentifier()  : object|null
Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned.
getObjectCountByQuery()  : int
Returns the number of records matching the query.
getObjectDataByQuery()  : array<int, array<string, mixed>>
Returns the object data matching the $query.
isNewObject()  : bool
Checks if the given object has ever been persisted.
setAggregateRootObjects()  : mixed
Sets the aggregate root objects
setChangedEntities()  : mixed
Sets the changed objects
setDeletedEntities()  : mixed
Sets the deleted entities
setPersistenceManager()  : mixed
Set a PersistenceManager instance.

Methods

commit()

Commits the current persistence session

public commit() : mixed

getIdentifierByObject()

Returns the (internal) identifier for the object, if it is known to the backend. Otherwise NULL is returned.

public getIdentifierByObject(object $object) : string|null
Parameters
$object : object
Return values
string|null

The identifier for the object if it is known, or NULL

getObjectByIdentifier()

Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned.

public getObjectByIdentifier(string $identifier, string $className) : object|null
Parameters
$identifier : string
$className : string
Return values
object|null

The object for the identifier if it is known, or NULL

getObjectCountByQuery()

Returns the number of records matching the query.

public getObjectCountByQuery(QueryInterface $query) : int
Parameters
$query : QueryInterface
Return values
int

getObjectDataByQuery()

Returns the object data matching the $query.

public getObjectDataByQuery(QueryInterface $query) : array<int, array<string, mixed>>
Parameters
$query : QueryInterface
Return values
array<int, array<string, mixed>>

isNewObject()

Checks if the given object has ever been persisted.

public isNewObject(object $object) : bool
Parameters
$object : object

The object to check

Return values
bool

TRUE if the object is new, FALSE if the object exists in the repository


        
On this page

Search results