Session

The persistence session - acts as a Unit of Work for Extbase persistence framework.

Internal

only to be used within Extbase, not part of TYPO3 Core API.

Table of Contents

Properties

$identifierMap  : array<non-empty-string, array<non-empty-string, object>>
$objectMap  : ObjectStorage
$reconstitutedEntities  : ObjectStorage

Methods

__construct()  : mixed
Constructs a new Session
destroy()  : void
Destroy the state of the persistence session and reset all internal data.
getIdentifierByObject()  : non-empty-string|null
Returns the identifier for the given object from the session, if the object was registered.
getObjectByIdentifier()  : object
Returns the object for the given identifier
getReconstitutedEntities()  : ObjectStorage
Returns all objects which have been registered as reconstituted
hasIdentifier()  : bool
Checks whether the given identifier is known to the identity map
hasObject()  : bool
Checks whether the given object is known to the identity map
registerObject()  : void
Register an identifier for an object
registerReconstitutedEntity()  : void
Registers data for a reconstituted object.
unregisterObject()  : void
Unregister an object
unregisterReconstitutedEntity()  : void
Unregisters data for a reconstituted object
getClassIdentifier()  : non-empty-string
Objects are stored in the cache with their implementation class name to allow reusing instances of different classes that point to the same implementation Returns a unique class identifier respecting configured implementation class names

Properties

$identifierMap

protected array<non-empty-string, array<non-empty-string, object>> $identifierMap = []

Methods

__construct()

Constructs a new Session

public __construct() : mixed

destroy()

Destroy the state of the persistence session and reset all internal data.

public destroy() : void

getIdentifierByObject()

Returns the identifier for the given object from the session, if the object was registered.

public getIdentifierByObject(object $object) : non-empty-string|null
Parameters
$object : object
Return values
non-empty-string|null

getObjectByIdentifier()

Returns the object for the given identifier

public getObjectByIdentifier(non-empty-string $identifier, class-string $className) : object
Parameters
$identifier : non-empty-string
$className : class-string
Return values
object

hasIdentifier()

Checks whether the given identifier is known to the identity map

public hasIdentifier(non-empty-string $identifier, class-string $className) : bool
Parameters
$identifier : non-empty-string
$className : class-string
Return values
bool

hasObject()

Checks whether the given object is known to the identity map

public hasObject(object $object) : bool
Parameters
$object : object
Return values
bool

registerObject()

Register an identifier for an object

public registerObject(object $object, non-empty-string $identifier) : void
Parameters
$object : object
$identifier : non-empty-string

registerReconstitutedEntity()

Registers data for a reconstituted object.

public registerReconstitutedEntity(object $entity) : void

$entityData format is described in "Documentation/PersistenceFramework object data format.txt"

Parameters
$entity : object

unregisterObject()

Unregister an object

public unregisterObject(object $object) : void
Parameters
$object : object

unregisterReconstitutedEntity()

Unregisters data for a reconstituted object

public unregisterReconstitutedEntity(object $entity) : void
Parameters
$entity : object

getClassIdentifier()

Objects are stored in the cache with their implementation class name to allow reusing instances of different classes that point to the same implementation Returns a unique class identifier respecting configured implementation class names

protected getClassIdentifier(class-string $className) : non-empty-string
Parameters
$className : class-string
Return values
non-empty-string

        
On this page

Search results