DataMapper deprecated
class DataMapper (View source)
deprecated
A data mapper to map raw records to objects
Properties
protected Session | $persistenceSession | ||
protected ReflectionService | $reflectionService | ||
protected PersistenceManagerInterface | $persistenceManager |
Methods
Injects a Reflection Service instance used for processing objects
Injects the persistence manager
Maps the (aggregate root) node data and registers the objects as reconstituted with the session.
Maps a single record into the object it represents and registers it as reconstituted with the session.
Sets the given properties on the object.
Creates a \DateTime from an unix timestamp. If the input is not an integer NULL is returned.
Maps an array proxy structure back to a native PHP array
Maps an SplObjectStorage proxy record back to an SplObjectStorage
Details
void
injectPersistenceSession(Session $persistenceSession)
Injects the persistence session
void
injectReflectionService(ReflectionService $reflectionService)
Injects a Reflection Service instance used for processing objects
void
setPersistenceManager(PersistenceManagerInterface $persistenceManager)
Injects the persistence manager
array
mapToObjects(array $objectsData)
Maps the (aggregate root) node data and registers the objects as reconstituted with the session.
Note: QueryResult relies on the fact that the first object of $objects has the numeric index "0"
object
mapToObject(array $objectData)
Maps a single record into the object it represents and registers it as reconstituted with the session.
void
thawProperties(object $object, string $identifier, array $objectData)
Sets the given properties on the object.
protected DateTime
mapDateTime(int $timestamp)
Creates a \DateTime from an unix timestamp. If the input is not an integer NULL is returned.
protected array
mapArray(array $arrayValues = null)
Maps an array proxy structure back to a native PHP array
protected SplObjectStorage
mapSplObjectStorage(array $objectStorageValues = null, bool $createLazySplObjectStorage = false)
Maps an SplObjectStorage proxy record back to an SplObjectStorage