PHP Class Neos\Flow\Persistence\AbstractPersistenceManager

Inheritance: implements Neos\Flow\Persistence\PersistenceManagerInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$hasUnpersistedChanges boolean
$newObjects array
$settings array
$whitelistedObjects SplObjectStorage

Méthodes publiques

Méthode Description
__construct ( ) Constructor
clearState ( ) : void Clears the in-memory state of the persistence.
convertObjectToIdentityArray ( object $object ) : array Converts the given object into an array containing the identity of the domain object.
convertObjectsToIdentityArrays ( array $array ) : array Recursively iterates through the given array and turns objects into an arrays containing the identity of the domain object.
hasUnpersistedChanges ( ) : boolean Gives feedback if the persistence Manager has unpersisted changes.
injectSettings ( array $settings ) : void Injects the Flow settings, the persistence part is kept for further use.
registerNewObject ( Aspect\PersistenceMagicInterface $object ) : void Registers an object which has been created or cloned during this request.
whitelistObject ( object $object ) : void Adds the given object to a whitelist of objects which may be persisted even if the current HTTP request is considered a "safe" request.

Méthodes protégées

Méthode Description
throwExceptionIfObjectIsNotWhitelisted ( object $object ) : void Checks if the given object is whitelisted and if not, throws an exception

Method Details

__construct() public méthode

Constructor
public __construct ( )

clearState() public méthode

Clears the in-memory state of the persistence.
public clearState ( ) : void
Résultat void

convertObjectToIdentityArray() public méthode

Converts the given object into an array containing the identity of the domain object.
public convertObjectToIdentityArray ( object $object ) : array
$object object The object to be converted
Résultat array The identity array in the format array('__identity' => '...')

convertObjectsToIdentityArrays() public méthode

Recursively iterates through the given array and turns objects into an arrays containing the identity of the domain object.
public convertObjectsToIdentityArrays ( array $array ) : array
$array array The array to be iterated over
Résultat array The modified array without objects

hasUnpersistedChanges() public méthode

This is primarily used to inform the user if he tries to save data in an unsafe request.
public hasUnpersistedChanges ( ) : boolean
Résultat boolean

injectSettings() public méthode

Injects the Flow settings, the persistence part is kept for further use.
public injectSettings ( array $settings ) : void
$settings array
Résultat void

registerNewObject() public méthode

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.
public registerNewObject ( Aspect\PersistenceMagicInterface $object ) : void
$object Aspect\PersistenceMagicInterface The new object to register
Résultat void

throwExceptionIfObjectIsNotWhitelisted() protected méthode

Checks if the given object is whitelisted and if not, throws an exception
protected throwExceptionIfObjectIsNotWhitelisted ( object $object ) : void
$object object
Résultat void

whitelistObject() public méthode

Adds the given object to a whitelist of objects which may be persisted even if the current HTTP request is considered a "safe" request.
public whitelistObject ( object $object ) : void
$object object The object
Résultat void

Property Details

$hasUnpersistedChanges protected_oe property

protected bool $hasUnpersistedChanges
Résultat boolean

$newObjects protected_oe property

protected array $newObjects
Résultat array

$settings protected_oe property

protected array $settings
Résultat array

$whitelistedObjects protected_oe property

protected SplObjectStorage $whitelistedObjects
Résultat SplObjectStorage