TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
Session Class Reference
Inheritance diagram for Session:
SingletonInterface

Public Member Functions

 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 __construct ()
 
 registerReconstitutedEntity ($entity, array $entityData=[])
 
 replaceReconstitutedEntity ($oldEntity, $newEntity)
 
 unregisterReconstitutedEntity ($entity)
 
 getReconstitutedEntities ()
 
 isReconstitutedEntity ($entity)
 
 hasObject ($object)
 
 hasIdentifier ($identifier, $className)
 
 getObjectByIdentifier ($identifier, $className)
 
 getIdentifierByObject ($object)
 
 registerObject ($object, $identifier)
 
 unregisterObject ($object)
 
 destroy ()
 

Protected Attributes

 $reconstitutedEntities
 
 $reconstitutedEntitiesData = []
 
 $objectMap
 
 $identifierMap = []
 
 $reflectionService
 

Detailed Description

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

Definition at line 22 of file Session.php.

Constructor & Destructor Documentation

__construct ( )

Constructs a new Session

Definition at line 66 of file Session.php.

Member Function Documentation

destroy ( )

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

Returns
void

Definition at line 223 of file Session.php.

getIdentifierByObject (   $object)

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

Parameters
object$object
Returns
string

Definition at line 184 of file Session.php.

References Session\hasObject().

Referenced by Session\unregisterReconstitutedEntity().

getObjectByIdentifier (   $identifier,
  $className 
)

Returns the object for the given identifier

Parameters
string$identifier
string$className
Returns
object

Definition at line 170 of file Session.php.

getReconstitutedEntities ( )

Returns all objects which have been registered as reconstituted

Returns
ObjectStorage All reconstituted objects

Definition at line 120 of file Session.php.

References Session\$reconstitutedEntities.

hasIdentifier (   $identifier,
  $className 
)

Checks whether the given identifier is known to the identity map

Parameters
string$identifier
string$className
Returns
bool

Definition at line 157 of file Session.php.

hasObject (   $object)

Checks whether the given object is known to the identity map

Parameters
object$object
Returns
bool

Definition at line 145 of file Session.php.

Referenced by Session\getIdentifierByObject().

injectReflectionService ( \TYPO3\CMS\Extbase\Reflection\ReflectionService  $reflectionService)
Parameters
\TYPO3\CMS\Extbase\Reflection\ReflectionService$reflectionService

Definition at line 58 of file Session.php.

References Session\$reflectionService.

isReconstitutedEntity (   $entity)

Tells whether the given object is a reconstituted entity.

Parameters
object$entity
Returns
bool

Definition at line 131 of file Session.php.

registerObject (   $object,
  $identifier 
)

Register an identifier for an object

Parameters
object$object
string$identifier

Definition at line 199 of file Session.php.

registerReconstitutedEntity (   $entity,
array  $entityData = [] 
)

Registers data for a reconstituted object.

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

Parameters
object$entity
array$entityData
Returns
void

Definition at line 82 of file Session.php.

replaceReconstitutedEntity (   $oldEntity,
  $newEntity 
)

Replace a reconstituted object, leaves the clean data unchanged.

Parameters
object$oldEntity
object$newEntity
Returns
void

Definition at line 95 of file Session.php.

unregisterObject (   $object)

Unregister an object

Parameters
object$object
Returns
void

Definition at line 211 of file Session.php.

unregisterReconstitutedEntity (   $entity)

Unregisters data for a reconstituted object

Parameters
object$entity
Returns
void

Definition at line 107 of file Session.php.

References Session\getIdentifierByObject().

Member Data Documentation

$identifierMap = []
protected

Definition at line 48 of file Session.php.

$objectMap
protected

Definition at line 43 of file Session.php.

$reconstitutedEntities
protected

Definition at line 29 of file Session.php.

Referenced by Session\getReconstitutedEntities().

$reconstitutedEntitiesData = []
protected

Definition at line 38 of file Session.php.

$reflectionService
protected

Definition at line 53 of file Session.php.

Referenced by Session\injectReflectionService().