PHP Класс Neos\Flow\Persistence\Generic\Backend\AbstractBackend

Наследование: implements Neos\Flow\Persistence\Generic\Backend\BackendInterface
Показать файл Открыть проект

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

Свойство Тип Описание
$aggregateRootObjects SplObjectStorage
$changedEntities SplObjectStorage
$classSchemata array
$deletedEntities SplObjectStorage
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$persistenceSession Neos\Flow\Persistence\Generic\Session
$reflectionService Neos\Flow\Reflection\ReflectionService
$systemLogger Neos\Flow\Log\SystemLoggerInterface
$validatorResolver Neos\Flow\Validation\ValidatorResolver
$visitedDuringPersistence SplObjectStorage

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

Метод Описание
__construct ( ) Constructs the backend
commit ( ) : void Commits the current persistence session.
initialize ( array $options ) : void Initializes the backend
injectPersistenceSession ( Session $persistenceSession ) : void Injects the persistence session
injectReflectionService ( ReflectionService $reflectionService ) : void Injects a Reflection Service instance used for processing objects
injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void Injects the system logger
injectValidatorResolver ( ValidatorResolver $validatorResolver ) : void Injects the ValidatorResolver
isConnected ( ) : boolean Returns TRUE, if an active connection to the persistence backend has been established, e.g. entities can be persisted.
setAggregateRootObjects ( SplObjectStorage $objects ) : void Sets the aggregate root objects
setChangedEntities ( SplObjectStorage $entities ) : void Sets the changed objects
setDeletedEntities ( SplObjectStorage $entities ) : void Sets the deleted objects
setPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void Set a PersistenceManager instance.

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

Метод Описание
arrayContainsObject ( array $array, object $object, string $identifier ) : boolean Checks whether the given object is contained in the array. This checks for object identity in terms of the persistence layer, i.e. the UUID, when comparing entities.
checkPropertyValue ( object $object, string $propertyName, array $propertyMetaData ) : mixed Check the property value for allowed types and throw exceptions for unsupported types.
collectProperties ( string $identifier, object $object, array $properties, boolean &$dirty ) : array
emitPersistedObject ( object $object, integer $objectState ) : void Signalizes that the given object has been persisted
emitRemovedObject ( object $object ) : void Signalizes that the given object has been removed
flattenValue ( string $identifier, object $object, string $propertyName, array $propertyMetaData, array &$propertyData ) : void Convert a value to the internal object data format
getType ( mixed $value ) : string Returns the type of $value, i.e. the class name or primitive type.
getTypeName ( string $type ) : string Returns the type name as used in the database table names.
persistObject ( object $object, string $parentIdentifier ) : string Stores or updates an object in the underlying storage.
persistObjects ( ) : void First persist new objects, then check reconstituted entities.
processArray ( array $array = null, string $parentIdentifier, array $previousArray = null ) : array Store an array as a set of records, with each array element becoming a property named like the key and the value.
processDateTime ( DateTimeInterface $dateTime = null ) : integer Creates a unix timestamp from the given DateTime object. If NULL is given NULL will be returned.
processDeletedObjects ( ) : void Iterate over deleted entities and process them
processNestedArray ( string $parentIdentifier, array $nestedArray, Closure $handler = null ) : string "Serializes" a nested array for storage.
processObject ( object $object, string $parentIdentifier ) : array
processSplObjectStorage ( SplObjectStorage $splObjectStorage = null, string $parentIdentifier, array $previousObjectStorage = null ) : array Store an SplObjectStorage as a set of records.
removeDeletedArrayEntries ( array $array = null, array $previousArray ) : void Remove objects removed from array compared to $previousArray.
removeDeletedReference ( object $object, string $propertyName, array $propertyMetaData ) : void Remove any unreferenced non aggregate root entity
removeDeletedSplObjectStorageEntries ( SplObjectStorage $splObjectStorage = null, array $previousObjectStorage ) : void Remove objects removed from SplObjectStorage compared to $previousSplObjectStorage.
removeEntity ( object $object ) : void Remove an entity
removeValueObject ( object $object ) : void Remove a value object
storeObject ( object $object, string $identifier, string $parentIdentifier, array &$objectData ) : integer Actually store an object, backend-specific
validateObject ( object $object ) : void Validates the given object and throws an exception if validation fails.

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

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

Constructs the backend
public __construct ( )

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

Checks whether the given object is contained in the array. This checks for object identity in terms of the persistence layer, i.e. the UUID, when comparing entities.
protected arrayContainsObject ( array $array, object $object, string $identifier ) : boolean
$array array
$object object
$identifier string
Результат boolean

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

Check the property value for allowed types and throw exceptions for unsupported types.
protected checkPropertyValue ( object $object, string $propertyName, array $propertyMetaData ) : mixed
$object object The object with the property to check
$propertyName string The name of the property to check
$propertyMetaData array Property metadata
Результат mixed The value of the property

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

protected collectProperties ( string $identifier, object $object, array $properties, boolean &$dirty ) : array
$identifier string The object's identifier
$object object The object to work on
$properties array The properties to collect (as per class schema)
$dirty boolean A dirty flag that is passed by reference and set to TRUE if a dirty property was found
Результат array

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

Commits the current persistence session.
public commit ( ) : void
Результат void

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

Signalizes that the given object has been persisted
protected emitPersistedObject ( object $object, integer $objectState ) : void
$object object The object that will be persisted
$objectState integer The state, see self::OBJECTSTATE_*
Результат void

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

Signalizes that the given object has been removed
protected emitRemovedObject ( object $object ) : void
$object object The object that will be removed
Результат void

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

Convert a value to the internal object data format
protected flattenValue ( string $identifier, object $object, string $propertyName, array $propertyMetaData, array &$propertyData ) : void
$identifier string The object's identifier
$object object The object with the property to flatten
$propertyName string The name of the property
$propertyMetaData array The property metadata
$propertyData array Reference to the property data array
Результат void

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

Returns the type of $value, i.e. the class name or primitive type.
protected getType ( mixed $value ) : string
$value mixed
Результат string

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

Returns the type name as used in the database table names.
protected getTypeName ( string $type ) : string
$type string
Результат string

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

Initializes the backend
public initialize ( array $options ) : void
$options array
Результат void

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

Injects the persistence session
public injectPersistenceSession ( Session $persistenceSession ) : void
$persistenceSession Neos\Flow\Persistence\Generic\Session
Результат void

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

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

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

Injects the system logger
public injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
$systemLogger Neos\Flow\Log\SystemLoggerInterface
Результат void

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

Injects the ValidatorResolver
public injectValidatorResolver ( ValidatorResolver $validatorResolver ) : void
$validatorResolver Neos\Flow\Validation\ValidatorResolver
Результат void

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

Returns TRUE, if an active connection to the persistence backend has been established, e.g. entities can be persisted.
public isConnected ( ) : boolean
Результат boolean TRUE, if an connection has been established, FALSE if add object will not be persisted by the backend

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

Stores or updates an object in the underlying storage.
protected persistObject ( object $object, string $parentIdentifier ) : string
$object object The object to persist
$parentIdentifier string
Результат string

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

First persist new objects, then check reconstituted entities.
protected persistObjects ( ) : void
Результат void

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

Note: Objects contained in the array will have a matching entry created, the objects must be persisted elsewhere!
protected processArray ( array $array = null, string $parentIdentifier, array $previousArray = null ) : array
$array array The array to persist
$parentIdentifier string
$previousArray array the previously persisted state of the array
Результат array An array with "flat" values representing the array

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

Creates a unix timestamp from the given DateTime object. If NULL is given NULL will be returned.
protected processDateTime ( DateTimeInterface $dateTime = null ) : integer
$dateTime DateTimeInterface
Результат integer

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

Iterate over deleted entities and process them
protected processDeletedObjects ( ) : void
Результат void

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

"Serializes" a nested array for storage.
protected processNestedArray ( string $parentIdentifier, array $nestedArray, Closure $handler = null ) : string
$parentIdentifier string
$nestedArray array
$handler Closure
Результат string

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

protected processObject ( object $object, string $parentIdentifier ) : array
$object object
$parentIdentifier string
Результат array

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

Note: Objects contained in the SplObjectStorage will have a matching entry created, the objects must be persisted elsewhere!
protected processSplObjectStorage ( SplObjectStorage $splObjectStorage = null, string $parentIdentifier, array $previousObjectStorage = null ) : array
$splObjectStorage SplObjectStorage The SplObjectStorage to persist
$parentIdentifier string
$previousObjectStorage array the previously persisted state of the SplObjectStorage
Результат array An array with "flat" values representing the SplObjectStorage

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

Remove objects removed from array compared to $previousArray.
protected removeDeletedArrayEntries ( array $array = null, array $previousArray ) : void
$array array
$previousArray array
Результат void

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

Remove any unreferenced non aggregate root entity
protected removeDeletedReference ( object $object, string $propertyName, array $propertyMetaData ) : void
$object object
$propertyName string
$propertyMetaData array
Результат void

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

Remove objects removed from SplObjectStorage compared to $previousSplObjectStorage.
protected removeDeletedSplObjectStorageEntries ( SplObjectStorage $splObjectStorage = null, array $previousObjectStorage ) : void
$splObjectStorage SplObjectStorage
$previousObjectStorage array
Результат void

removeEntity() абстрактный защищенный Метод

Remove an entity
abstract protected removeEntity ( object $object ) : void
$object object
Результат void

removeValueObject() абстрактный защищенный Метод

Remove a value object
abstract protected removeValueObject ( object $object ) : void
$object object
Результат void

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

Sets the aggregate root objects
public setAggregateRootObjects ( SplObjectStorage $objects ) : void
$objects SplObjectStorage
Результат void

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

Sets the changed objects
public setChangedEntities ( SplObjectStorage $entities ) : void
$entities SplObjectStorage
Результат void

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

Sets the deleted objects
public setDeletedEntities ( SplObjectStorage $entities ) : void
$entities SplObjectStorage
Результат void

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

Set a PersistenceManager instance.
public setPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
Результат void

storeObject() абстрактный защищенный Метод

Actually store an object, backend-specific
abstract protected storeObject ( object $object, string $identifier, string $parentIdentifier, array &$objectData ) : integer
$object object
$identifier string
$parentIdentifier string
$objectData array
Результат integer one of self::OBJECTSTATE_*

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

Validates the given object and throws an exception if validation fails.
protected validateObject ( object $object ) : void
$object object
Результат void

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

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

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

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

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

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

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

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

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

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

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Результат Neos\Flow\Persistence\PersistenceManagerInterface

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

protected Session,Neos\Flow\Persistence\Generic $persistenceSession
Результат Neos\Flow\Persistence\Generic\Session

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

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

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

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Результат Neos\Flow\Log\SystemLoggerInterface

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

protected ValidatorResolver,Neos\Flow\Validation $validatorResolver
Результат Neos\Flow\Validation\ValidatorResolver

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

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