TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
LazyObjectStorage Class Reference
Inheritance diagram for LazyObjectStorage:
ObjectStorage LoadingStrategyInterface ObjectMonitoringInterface

Public Member Functions

 injectDataMapper (\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper)
 
 isInitialized ()
 
 __construct ($parentObject, $propertyName, $fieldValue)
 
 addAll (\TYPO3\CMS\Extbase\Persistence\ObjectStorage $storage)
 
 attach ($object, $data=null)
 
 contains ($object)
 
 count ()
 
 current ()
 
 detach ($object)
 
 key ()
 
 next ()
 
 offsetExists ($object)
 
 offsetGet ($object)
 
 offsetSet ($object, $info)
 
 offsetUnset ($object)
 
 removeAll (\TYPO3\CMS\Extbase\Persistence\ObjectStorage $storage)
 
 rewind ()
 
 valid ()
 
 toArray ()
 
 getPosition ($object)
 
- Public Member Functions inherited from ObjectStorage
 rewind ()
 
 valid ()
 
 key ()
 
 current ()
 
 next ()
 
 count ()
 
 offsetSet ($object, $information)
 
 offsetExists ($object)
 
 offsetUnset ($object)
 
 offsetGet ($object)
 
 contains ($object)
 
 attach ($object, $information=null)
 
 detach ($object)
 
 getInfo ()
 
 setInfo ($data)
 
 addAll (ObjectStorage $objectStorage)
 
 removeAll (ObjectStorage $objectStorage)
 
 toArray ()
 
 serialize ()
 
 unserialize ($serialized)
 
 _memorizeCleanState ()
 
 _isDirty ()
 
 isRelationDirty ($object)
 
 getPosition ($object)
 

Protected Member Functions

 initialize ()
 
 isStorageAlreadyMemorizedInParentCleanState ()
 

Protected Attributes

 $dataMapper
 
 $parentObject
 
 $propertyName
 
 $fieldValue
 
 $isInitialized = false
 
- Protected Attributes inherited from ObjectStorage
 $storage = array()
 
 $isModified = false
 
 $addedObjectsPositions = array()
 
 $removedObjectsPositions = array()
 
 $positionCounter = 0
 

Private Attributes

 $warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyObjectStorage. To retrieve the first result, you can use the rewind() and current() methods.'
 

Detailed Description

A proxy that can replace any object and replaces itself in it's parent on first access (call, get, set, isset, unset).

Definition at line 23 of file LazyObjectStorage.php.

Constructor & Destructor Documentation

__construct (   $parentObject,
  $propertyName,
  $fieldValue 
)

Constructs this proxy instance.

Parameters
DomainObjectInterface$parentObjectThe object instance this proxy is part of
string$propertyNameThe name of the proxied property in it's parent
mixed$fieldValueThe raw field value.

Definition at line 91 of file LazyObjectStorage.php.

References LazyObjectStorage\$fieldValue, LazyObjectStorage\$parentObject, and LazyObjectStorage\$propertyName.

Member Function Documentation

Parameters
\TYPO3\CMS\Extbase\Persistence\ObjectStorage$storage
See Also
::addAll

Definition at line 133 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

attach (   $object,
  $data = null 
)
Parameters
object$objectThe object to add.
mixed$dataThe data to associate with the object.
See Also
::attach

Definition at line 145 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

contains (   $object)
Parameters
object$objectThe object to look for.
Returns
bool
See Also
::contains

Definition at line 157 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

count ( )

Counts the elements in the storage array

Exceptions
Exception
Returns
int The number of elements in the ObjectStorage

Definition at line 169 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize(), and LazyObjectStorage\isInitialized().

current ( )
Returns
object The object at the current iterator position.
See Also
::current

Definition at line 190 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

detach (   $object)
Parameters
object$objectThe object to remove.
See Also
::detach

Definition at line 201 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

getPosition (   $object)
Parameters
mixed$object
Returns
int|NULL

Definition at line 322 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

initialize ( )
protected
injectDataMapper ( \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper  $dataMapper)
Parameters
\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper$dataMapper

Definition at line 69 of file LazyObjectStorage.php.

References LazyObjectStorage\$dataMapper.

isInitialized ( )

Returns the state of the initialization

Returns
bool

Definition at line 79 of file LazyObjectStorage.php.

References LazyObjectStorage\$isInitialized.

Referenced by LazyObjectStorage\count(), and LazyObjectStorage\initialize().

isStorageAlreadyMemorizedInParentCleanState ( )
protected
Returns
bool

Definition at line 122 of file LazyObjectStorage.php.

Referenced by LazyObjectStorage\initialize().

key ( )
Returns
string The index corresponding to the position of the iterator.
See Also
::key

Definition at line 212 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

next ( )
See Also
::next

Definition at line 221 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

offsetExists (   $object)
Parameters
object$objectThe object to look for.
Returns
bool
See Also
::offsetExists

Definition at line 233 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

offsetGet (   $object)
Parameters
object$objectThe object to look for.
Returns
mixed
See Also
::offsetGet

Definition at line 245 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

offsetSet (   $object,
  $info 
)
Parameters
object$objectThe object to add.
mixed$infoThe data to associate with the object.
See Also
::offsetSet

Definition at line 257 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

offsetUnset (   $object)
Parameters
object$objectThe object to remove.
Returns
void
See Also
::offsetUnset

Definition at line 269 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

Parameters
\TYPO3\CMS\Extbase\Persistence\ObjectStorage$storageThe storage containing the elements to remove.
Returns
void
See Also
::removeAll

Definition at line 281 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

rewind ( )
See Also
::rewind

Definition at line 290 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

toArray ( )
Returns
array
See Also
::toArray

Definition at line 312 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

valid ( )
Returns
bool
See Also
::valid

Definition at line 301 of file LazyObjectStorage.php.

References LazyObjectStorage\initialize().

Member Data Documentation

$dataMapper
protected

Definition at line 38 of file LazyObjectStorage.php.

Referenced by LazyObjectStorage\injectDataMapper().

$fieldValue
protected

Definition at line 59 of file LazyObjectStorage.php.

Referenced by LazyObjectStorage\__construct().

$isInitialized = false
protected

Definition at line 64 of file LazyObjectStorage.php.

Referenced by LazyObjectStorage\isInitialized().

$parentObject
protected

Definition at line 45 of file LazyObjectStorage.php.

Referenced by LazyObjectStorage\__construct().

$propertyName
protected

Definition at line 52 of file LazyObjectStorage.php.

Referenced by LazyObjectStorage\__construct().

$warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyObjectStorage. To retrieve the first result, you can use the rewind() and current() methods.'
private

Definition at line 33 of file LazyObjectStorage.php.