AbstractPersistenceManager
abstract class AbstractPersistenceManager implements PersistenceManagerInterface (View source)
The Flow Persistence Manager base class
Properties
protected array | $settings | ||
protected array | $newObjects | ||
protected bool | $hasUnpersistedChanges | ||
protected AllowedObjectsContainer | $allowedObjects |
Methods
Injects the Flow settings, the persistence part is kept for further use.
Clears the in-memory state of the persistence.
Registers an object which has been created or cloned during this request.
Adds the given object to a list of allowed objects which may be persisted even if the current HTTP request is considered a "safe" request.
Converts the given object into an array containing the identity of the domain object.
Recursively iterates through the given array and turns objects into an arrays containing the identity of the domain object.
Gives feedback if the persistence Manager has unpersisted changes.
Details
void
injectSettings(array $settings)
Injects the Flow settings, the persistence part is kept for further use.
void
clearState()
Clears the in-memory state of the persistence.
void
registerNewObject(PersistenceMagicInterface $object)
Registers an object which has been created or cloned during this request.
The given object must contain the Persistence_Object_Identifier property, thus the PersistenceMagicInterface type hint. A "new" object does not necessarily have to be known by any repository or be persisted in the end.
Objects registered with this method must be known to the getObjectByIdentifier() method.
void
allowObject(object $object)
Adds the given object to a list of allowed objects which may be persisted even if the current HTTP request is considered a "safe" request.
array
convertObjectToIdentityArray(object $object)
Converts the given object into an array containing the identity of the domain object.
array
convertObjectsToIdentityArrays(array $array)
Recursively iterates through the given array and turns objects into an arrays containing the identity of the domain object.
bool
hasUnpersistedChanges()
Gives feedback if the persistence Manager has unpersisted changes.
This is primarily used to inform the user if he tries to save data in an unsafe request.