PHP Класс Neos\Flow\Persistence\Generic\Session

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$identifierMap array
$objectMap SplObjectStorage
$reconstitutedEntities SplObjectStorage Reconstituted objects
$reconstitutedEntitiesData array Reconstituted entity data (effectively their clean state)
$reflectionService Neos\Flow\Reflection\ReflectionService

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

Constructs a new Session
public __construct ( )

destroy() публичный Метод

Destroy the state of the persistence session and reset all internal data.
public destroy ( ) : void
Результат void

getCleanStateOfProperty() публичный Метод

If nothing is found, NULL is returned.
public getCleanStateOfProperty ( object $object, string $propertyName ) : mixed
$object object
$propertyName string
Результат mixed

getIdentifierByObject() публичный Метод

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
Результат string

getObjectByIdentifier() публичный Метод

Returns the object for the given identifier
public getObjectByIdentifier ( string $identifier ) : object
$identifier string
Результат object

getReconstitutedEntities() публичный Метод

Returns all objects which have been registered as reconstituted
public getReconstitutedEntities ( ) : SplObjectStorage
Результат SplObjectStorage All reconstituted objects

hasIdentifier() публичный Метод

Checks whether the given identifier is known to the identity map
public hasIdentifier ( string $identifier ) : boolean
$identifier string
Результат boolean

hasObject() публичный Метод

Checks whether the given object is known to the identity map
public hasObject ( object $object ) : boolean
$object object
Результат boolean

injectReflectionService() публичный Метод

Injects a Reflection Service instance
public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
Результат void

isDirty() публичный Метод

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
Результат boolean

isMultiValuedPropertyDirty() защищенный Метод

Checks the $currentValue against the $cleanData.
protected isMultiValuedPropertyDirty ( array $cleanData, Traversable $currentValue ) : boolean
$cleanData array
$currentValue Traversable
Результат boolean

isReconstitutedEntity() публичный Метод

Tells whether the given object is a reconstituted entity.
public isReconstitutedEntity ( object $entity ) : boolean
$entity object
Результат boolean

isSingleValuedPropertyDirty() защищенный Метод

Checks the $previousValue against the $currentValue.
protected isSingleValuedPropertyDirty ( string $type, mixed $previousValue, $currentValue ) : boolean
$type string
$previousValue mixed
Результат boolean

registerObject() публичный Метод

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

registerReconstitutedEntity() публичный Метод

$entityData format is described in "Documentation/PersistenceFramework object data format.txt"
public registerReconstitutedEntity ( object $entity, array $entityData ) : void
$entity object
$entityData array
Результат void

replaceReconstitutedEntity() публичный Метод

Replace a reconstituted object, leaves the clean data unchanged.
public replaceReconstitutedEntity ( object $oldEntity, object $newEntity ) : void
$oldEntity object
$newEntity object
Результат void

unregisterObject() публичный Метод

Unregister an object
public unregisterObject ( string $object ) : void
$object string
Результат void

unregisterReconstitutedEntity() публичный Метод

Unregisters data for a reconstituted object
public unregisterReconstitutedEntity ( object $entity ) : void
$entity object
Результат void

Описание свойств

$identifierMap защищенное свойство

protected array $identifierMap
Результат array

$objectMap защищенное свойство

protected SplObjectStorage $objectMap
Результат SplObjectStorage

$reconstitutedEntities защищенное свойство

Reconstituted objects
protected SplObjectStorage $reconstitutedEntities
Результат SplObjectStorage

$reconstitutedEntitiesData защищенное свойство

Reconstituted entity data (effectively their clean state)
protected array $reconstitutedEntitiesData
Результат array

$reflectionService защищенное свойство

protected ReflectionService,Neos\Flow\Reflection $reflectionService
Результат Neos\Flow\Reflection\ReflectionService