interface BackendInterface (View source)

deprecated since Flow 6.0

A persistence backend interface

Methods

void
setPersistenceManager(PersistenceManagerInterface $persistenceManager)

Set a PersistenceManager instance.

void
initialize(array $options)

Initializes the backend

void
setAggregateRootObjects(SplObjectStorage $objects)

Sets the aggregate root objects

void
setDeletedEntities(SplObjectStorage $entities)

Sets the deleted entities

void
setChangedEntities(SplObjectStorage $entities)

Sets the changed objects

void
commit()

Commits the current persistence session

int
getObjectCountByQuery(QueryInterface $query)

Returns the number of items matching the query.

array
getObjectDataByQuery(QueryInterface $query)

Returns the object data matching the $query.

array
getObjectDataByIdentifier(string $identifier, string $objectType = null)

Returns the object data for the given identifier.

bool
isConnected()

Returns true, if an active connection to the persistence backend has been established, e.g. entities can be persisted.

Details

void setPersistenceManager(PersistenceManagerInterface $persistenceManager)

Set a PersistenceManager instance.

Parameters

PersistenceManagerInterface $persistenceManager

Return Value

void

void initialize(array $options)

Initializes the backend

Parameters

array $options

Return Value

void

void setAggregateRootObjects(SplObjectStorage $objects)

Sets the aggregate root objects

Parameters

SplObjectStorage $objects

Return Value

void

void setDeletedEntities(SplObjectStorage $entities)

Sets the deleted entities

Parameters

SplObjectStorage $entities

Return Value

void

void setChangedEntities(SplObjectStorage $entities)

Sets the changed objects

Parameters

SplObjectStorage $entities

Return Value

void

void commit()

Commits the current persistence session

Return Value

void

int getObjectCountByQuery(QueryInterface $query)

Returns the number of items matching the query.

Parameters

QueryInterface $query

Return Value

int

array getObjectDataByQuery(QueryInterface $query)

Returns the object data matching the $query.

Parameters

QueryInterface $query

Return Value

array

array getObjectDataByIdentifier(string $identifier, string $objectType = null)

Returns the object data for the given identifier.

Parameters

string $identifier

The UUID or Hash of the object

string $objectType

Return Value

array

bool isConnected()

Returns true, if an active connection to the persistence backend has been established, e.g. entities can be persisted.

Return Value

bool

true, if an connection has been established, false if add object will not be persisted by the backend