PHP Class Neos\Flow\Persistence\Generic\Session

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$identifierMap array
$objectMap SplObjectStorage
$reconstitutedEntities SplObjectStorage Reconstituted objects
$reconstitutedEntitiesData array Reconstituted entity data (effectively their clean state)
$reflectionService Neos\Flow\Reflection\ReflectionService

Méthodes publiques

Méthode Description
__construct ( ) Constructs a new Session
destroy ( ) : void Destroy the state of the persistence session and reset all internal data.
getCleanStateOfProperty ( object $object, string $propertyName ) : mixed Returns the previous (last persisted) state of the property.
getIdentifierByObject ( object $object ) : string Returns the identifier for the given object either from the session, if the object was registered, or from the object itself using a special uuid property or the internal properties set by AOP.
getObjectByIdentifier ( string $identifier ) : object Returns the object for the given identifier
getReconstitutedEntities ( ) : SplObjectStorage Returns all objects which have been registered as reconstituted
hasIdentifier ( string $identifier ) : boolean Checks whether the given identifier is known to the identity map
hasObject ( object $object ) : boolean Checks whether the given object is known to the identity map
injectReflectionService ( ReflectionService $reflectionService ) : void Injects a Reflection Service instance
isDirty ( object $object, string $propertyName ) : boolean Checks whether the given property was changed in the object since it was reconstituted. Returns TRUE for unknown objects in all cases!
isReconstitutedEntity ( object $entity ) : boolean Tells whether the given object is a reconstituted entity.
registerObject ( object $object, string $identifier ) Register an identifier for an object
registerReconstitutedEntity ( object $entity, array $entityData ) : void Registers data for a reconstituted object.
replaceReconstitutedEntity ( object $oldEntity, object $newEntity ) : void Replace a reconstituted object, leaves the clean data unchanged.
unregisterObject ( string $object ) : void Unregister an object
unregisterReconstitutedEntity ( object $entity ) : void Unregisters data for a reconstituted object

Méthodes protégées

Méthode Description
isMultiValuedPropertyDirty ( array $cleanData, Traversable $currentValue ) : boolean Checks the $currentValue against the $cleanData.
isSingleValuedPropertyDirty ( string $type, mixed $previousValue, $currentValue ) : boolean Checks the $previousValue against the $currentValue.

Method Details

__construct() public méthode

Constructs a new Session
public __construct ( )

destroy() public méthode

Destroy the state of the persistence session and reset all internal data.
public destroy ( ) : void
Résultat void

getCleanStateOfProperty() public méthode

If nothing is found, NULL is returned.
public getCleanStateOfProperty ( object $object, string $propertyName ) : mixed
$object object
$propertyName string
Résultat mixed

getIdentifierByObject() public méthode

Note: this returns an UUID even if the object has not been persisted in case of AOP-managed entities. Use isNewObject() if you need to distinguish those cases.
public getIdentifierByObject ( object $object ) : string
$object object
Résultat string

getObjectByIdentifier() public méthode

Returns the object for the given identifier
public getObjectByIdentifier ( string $identifier ) : object
$identifier string
Résultat object

getReconstitutedEntities() public méthode

Returns all objects which have been registered as reconstituted
public getReconstitutedEntities ( ) : SplObjectStorage
Résultat SplObjectStorage All reconstituted objects

hasIdentifier() public méthode

Checks whether the given identifier is known to the identity map
public hasIdentifier ( string $identifier ) : boolean
$identifier string
Résultat boolean

hasObject() public méthode

Checks whether the given object is known to the identity map
public hasObject ( object $object ) : boolean
$object object
Résultat boolean

injectReflectionService() public méthode

Injects a Reflection Service instance
public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
Résultat void

isDirty() public méthode

Checks whether the given property was changed in the object since it was reconstituted. Returns TRUE for unknown objects in all cases!
public isDirty ( object $object, string $propertyName ) : boolean
$object object
$propertyName string
Résultat boolean

isMultiValuedPropertyDirty() protected méthode

Checks the $currentValue against the $cleanData.
protected isMultiValuedPropertyDirty ( array $cleanData, Traversable $currentValue ) : boolean
$cleanData array
$currentValue Traversable
Résultat boolean

isReconstitutedEntity() public méthode

Tells whether the given object is a reconstituted entity.
public isReconstitutedEntity ( object $entity ) : boolean
$entity object
Résultat boolean

isSingleValuedPropertyDirty() protected méthode

Checks the $previousValue against the $currentValue.
protected isSingleValuedPropertyDirty ( string $type, mixed $previousValue, $currentValue ) : boolean
$type string
$previousValue mixed
Résultat boolean

registerObject() public méthode

Register an identifier for an object
public registerObject ( object $object, string $identifier )
$object object
$identifier string

registerReconstitutedEntity() public méthode

$entityData format is described in "Documentation/PersistenceFramework object data format.txt"
public registerReconstitutedEntity ( object $entity, array $entityData ) : void
$entity object
$entityData array
Résultat void

replaceReconstitutedEntity() public méthode

Replace a reconstituted object, leaves the clean data unchanged.
public replaceReconstitutedEntity ( object $oldEntity, object $newEntity ) : void
$oldEntity object
$newEntity object
Résultat void

unregisterObject() public méthode

Unregister an object
public unregisterObject ( string $object ) : void
$object string
Résultat void

unregisterReconstitutedEntity() public méthode

Unregisters data for a reconstituted object
public unregisterReconstitutedEntity ( object $entity ) : void
$entity object
Résultat void

Property Details

$identifierMap protected_oe property

protected array $identifierMap
Résultat array

$objectMap protected_oe property

protected SplObjectStorage $objectMap
Résultat SplObjectStorage

$reconstitutedEntities protected_oe property

Reconstituted objects
protected SplObjectStorage $reconstitutedEntities
Résultat SplObjectStorage

$reconstitutedEntitiesData protected_oe property

Reconstituted entity data (effectively their clean state)
protected array $reconstitutedEntitiesData
Résultat array

$reflectionService protected_oe property

protected ReflectionService,Neos\Flow\Reflection $reflectionService
Résultat Neos\Flow\Reflection\ReflectionService