‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy:
TYPO3\CMS\Extbase\Persistence\Generic\LoadingStrategyInterface

Public Member Functions

 injectObjectManager (ObjectManagerInterface $objectManager)
 
 __construct ($parentObject, $propertyName, $fieldValue, ?DataMapper $dataMapper=null)
 
 initializeObject ()
 
object _loadRealInstance ()
 
string _getTypeAndUidString ()
 
int getUid ()
 
mixed __call ($methodName, $arguments)
 
mixed __get ($propertyName)
 
 __set ($propertyName, $value)
 
bool __isset ($propertyName)
 
 __unset ($propertyName)
 
string __toString ()
 
mixed current ()
 
int key ()
 
 next ()
 
 rewind ()
 
bool valid ()
 

Protected Attributes

DataMapper null $dataMapper
 
ObjectManagerInterface $objectManager
 

Private Attributes

DomainObjectInterface $parentObject
 
string $propertyName
 
mixed $fieldValue
 

Detailed Description

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

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

Definition at line 28 of file LazyLoadingProxy.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::__construct (   $parentObject,
  $propertyName,
  $fieldValue,
?DataMapper  $dataMapper = null 
)

Constructs this proxy instance.

Parameters
DomainObjectInterface$parentObject‪The object instance this proxy is part of
string$propertyName‪The name of the proxied property in it's parent
mixed$fieldValue‪The raw field value.
?DataMapper‪$dataMapper

Definition at line 72 of file LazyLoadingProxy.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\$dataMapper, TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\$fieldValue, TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\$parentObject, and TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\$propertyName.

Member Function Documentation

◆ __call()

mixed TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::__call (   $methodName,
  $arguments 
)

Magic method call implementation.

Parameters
string$methodName‪The name of the property to get
array$arguments‪The arguments given to the call
Returns
‪mixed

Definition at line 137 of file LazyLoadingProxy.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\_loadRealInstance().

◆ __get()

mixed TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::__get (   $propertyName)

Magic get call implementation.

Parameters
string$propertyName‪The name of the property to get
Returns
‪mixed

Definition at line 154 of file LazyLoadingProxy.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\$propertyName, and TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\_loadRealInstance().

◆ __isset()

bool TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::__isset (   $propertyName)

Magic isset call implementation.

Parameters
string$propertyName‪The name of the property to check
Returns
‪bool

Definition at line 178 of file LazyLoadingProxy.php.

◆ __set()

TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::__set (   $propertyName,
  $value 
)

Magic set call implementation.

Parameters
string$propertyName‪The name of the property to set
mixed$value‪The value for the property to set

Definition at line 166 of file LazyLoadingProxy.php.

◆ __toString()

string TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::__toString ( )

Magic toString call implementation.

Returns
‪string

Definition at line 200 of file LazyLoadingProxy.php.

◆ __unset()

TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::__unset (   $propertyName)

Magic unset call implementation.

Parameters
string$propertyName‪The name of the property to unset

Definition at line 189 of file LazyLoadingProxy.php.

◆ _getTypeAndUidString()

string TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::_getTypeAndUidString ( )
Returns
‪string

Definition at line 116 of file LazyLoadingProxy.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\$fieldValue.

◆ _loadRealInstance()

object TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::_loadRealInstance ( )

Populate this proxy by asking the $population closure.

Returns
‪object The instance (hopefully) returned

Definition at line 95 of file LazyLoadingProxy.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getProperty().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\__call(), and TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\__get().

◆ current()

mixed TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::current ( )

Returns the current value of the storage array

Returns
‪mixed

Definition at line 211 of file LazyLoadingProxy.php.

◆ getUid()

int TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::getUid ( )

◆ initializeObject()

TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::initializeObject ( )

Object initialization called when object is created with ObjectManager, after constructor

Definition at line 83 of file LazyLoadingProxy.php.

◆ injectObjectManager()

TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::injectObjectManager ( ObjectManagerInterface  $objectManager)
Parameters
ObjectManagerInterface$objectManager

Definition at line 59 of file LazyLoadingProxy.php.

References TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\$objectManager.

◆ key()

int TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::key ( )

Returns the current key storage array

Returns
‪int

Definition at line 223 of file LazyLoadingProxy.php.

◆ next()

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

Returns the next position of the storage array

Definition at line 233 of file LazyLoadingProxy.php.

◆ rewind()

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

Resets the array pointer of the storage

Definition at line 243 of file LazyLoadingProxy.php.

◆ valid()

bool TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::valid ( )

Checks if the array pointer of the storage points to a valid position

Returns
‪bool

Definition at line 255 of file LazyLoadingProxy.php.

Member Data Documentation

◆ $dataMapper

DataMapper null TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::$dataMapper
protected

◆ $fieldValue

mixed TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::$fieldValue
private

◆ $objectManager

ObjectManagerInterface TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::$objectManager
protected

◆ $parentObject

DomainObjectInterface TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::$parentObject
private

The object this property is contained in.

Definition at line 38 of file LazyLoadingProxy.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\__construct().

◆ $propertyName

string TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::$propertyName
private

The name of the property represented by this proxy.

Definition at line 44 of file LazyLoadingProxy.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\__construct(), and TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\__get().