PHP Class Neos\Flow\Persistence\Generic\DataMapper

Show file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$persistenceSession Session
$reflectionService Neos\Flow\Reflection\ReflectionService

Public Methods

Method Description
injectPersistenceSession ( Session $persistenceSession ) : void Injects the persistence session
injectReflectionService ( ReflectionService $reflectionService ) : void Injects a Reflection Service instance used for processing objects
mapToObject ( array $objectData ) : object Maps a single record into the object it represents and registers it as reconstituted with the session.
mapToObjects ( array $objectsData ) : array Maps the (aggregate root) node data and registers the objects as reconstituted with the session.
setPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void Injects the persistence manager
thawProperties ( object $object, string $identifier, array $objectData ) : void Sets the given properties on the object.

Protected Methods

Method Description
mapArray ( array $arrayValues = null ) : array Maps an array proxy structure back to a native PHP array
mapDateTime ( integer $timestamp ) : DateTime Creates a \DateTime from an unix timestamp. If the input is not an integer NULL is returned.
mapSplObjectStorage ( array $objectStorageValues = null, boolean $createLazySplObjectStorage = false ) : SplObjectStorage Maps an SplObjectStorage proxy record back to an SplObjectStorage

Method Details

injectPersistenceSession() public method

Injects the persistence session
public injectPersistenceSession ( Session $persistenceSession ) : void
$persistenceSession Session The persistence session
return void

injectReflectionService() public method

Injects a Reflection Service instance used for processing objects
public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
return void

mapArray() protected method

Maps an array proxy structure back to a native PHP array
protected mapArray ( array $arrayValues = null ) : array
$arrayValues array
return array

mapDateTime() protected method

Creates a \DateTime from an unix timestamp. If the input is not an integer NULL is returned.
protected mapDateTime ( integer $timestamp ) : DateTime
$timestamp integer
return DateTime

mapSplObjectStorage() protected method

Maps an SplObjectStorage proxy record back to an SplObjectStorage
protected mapSplObjectStorage ( array $objectStorageValues = null, boolean $createLazySplObjectStorage = false ) : SplObjectStorage
$objectStorageValues array
$createLazySplObjectStorage boolean
return SplObjectStorage

mapToObject() public method

Maps a single record into the object it represents and registers it as reconstituted with the session.
public mapToObject ( array $objectData ) : object
$objectData array
return object

mapToObjects() public method

Note: QueryResult relies on the fact that the first object of $objects has the numeric index "0"
public mapToObjects ( array $objectsData ) : array
$objectsData array
return array

setPersistenceManager() public method

Injects the persistence manager
public setPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface The persistence manager
return void

thawProperties() public method

Sets the given properties on the object.
public thawProperties ( object $object, string $identifier, array $objectData ) : void
$object object The object to set properties on
$identifier string The identifier of the object
$objectData array
return void

Property Details

$persistenceManager protected property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$persistenceSession protected property

protected Session,Neos\Flow\Persistence\Generic $persistenceSession
return Session

$reflectionService protected property

protected ReflectionService,Neos\Flow\Reflection $reflectionService
return Neos\Flow\Reflection\ReflectionService