TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage:
TYPO3\CMS\Extbase\Persistence\ObjectStorage TYPO3\CMS\Extbase\Persistence\Generic\LoadingStrategyInterface TYPO3\CMS\Extbase\Persistence\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 TYPO3\CMS\Extbase\Persistence\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 TYPO3\CMS\Extbase\Persistence\ObjectStorage
 $storage = []
 
 $isModified = false
 
 $addedObjectsPositions = []
 
 $removedObjectsPositions = []
 
 $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()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::__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 TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\$fieldValue, TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\$parentObject, and TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\$propertyName.

Member Function Documentation

◆ addAll()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::addAll ( \TYPO3\CMS\Extbase\Persistence\ObjectStorage  $storage)
Parameters
\TYPO3\CMS\Extbase\Persistence\ObjectStorage$storage
See also
::addAll

Definition at line 133 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ attach()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::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 TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ contains()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::contains (   $object)
Parameters
object$objectThe object to look for.
Returns
bool
See also
::contains

Definition at line 157 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ count()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::count ( )

◆ current()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::current ( )
Returns
object The object at the current iterator position.
See also
::current

Definition at line 190 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ detach()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::detach (   $object)
Parameters
object$objectThe object to remove.
See also
::detach

Definition at line 201 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ getPosition()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::getPosition (   $object)
Parameters
mixed$object
Returns
int|NULL

Definition at line 322 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ initialize()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::initialize ( )
protected

This is a function lazy load implementation.

Returns
void

Definition at line 104 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\ObjectStorage\_memorizeCleanState(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\isInitialized(), and TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\isStorageAlreadyMemorizedInParentCleanState().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\addAll(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\attach(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\contains(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\count(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\current(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\detach(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\getPosition(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\key(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\next(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\offsetExists(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\offsetGet(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\offsetSet(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\offsetUnset(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\removeAll(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\rewind(), TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\toArray(), and TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\valid().

◆ injectDataMapper()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::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 TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\$dataMapper.

◆ isInitialized()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::isInitialized ( )

◆ isStorageAlreadyMemorizedInParentCleanState()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::isStorageAlreadyMemorizedInParentCleanState ( )
protected

◆ key()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::key ( )
Returns
string The index corresponding to the position of the iterator.
See also
::key

Definition at line 212 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ next()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::next ( )

◆ offsetExists()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::offsetExists (   $object)
Parameters
object$objectThe object to look for.
Returns
bool
See also
::offsetExists

Definition at line 233 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ offsetGet()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::offsetGet (   $object)
Parameters
object$objectThe object to look for.
Returns
mixed
See also
::offsetGet

Definition at line 245 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ offsetSet()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::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 TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ offsetUnset()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::offsetUnset (   $object)
Parameters
object$objectThe object to remove.
Returns
void
See also
::offsetUnset

Definition at line 269 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ removeAll()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::removeAll ( \TYPO3\CMS\Extbase\Persistence\ObjectStorage  $storage)
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 TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ rewind()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::rewind ( )

◆ toArray()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::toArray ( )
Returns
array
See also
::toArray

Definition at line 312 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

◆ valid()

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::valid ( )
Returns
bool
See also
::valid

Definition at line 301 of file LazyObjectStorage.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage\initialize().

Member Data Documentation

◆ $dataMapper

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::$dataMapper
protected

◆ $fieldValue

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::$fieldValue
protected

◆ $isInitialized

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::$isInitialized = false
protected

◆ $parentObject

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::$parentObject
protected

◆ $propertyName

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::$propertyName
protected

◆ $warning

TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::$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.