‪TYPO3CMS  ‪main
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

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

Protected Attributes

DataMapper $dataMapper = null
 

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 29 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.

Definition at line 58 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 113 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 130 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 158 of file LazyLoadingProxy.php.

◆ __serialize()

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

Definition at line 235 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 146 of file LazyLoadingProxy.php.

◆ __toString()

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

Magic toString call implementation.

Returns
‪string

Definition at line 180 of file LazyLoadingProxy.php.

◆ __unserialize()

TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::__unserialize ( array  $data)

Definition at line 242 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 169 of file LazyLoadingProxy.php.

◆ _getTypeAndUidString()

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

Definition at line 95 of file LazyLoadingProxy.php.

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

◆ _loadRealInstance()

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

Populate this proxy by asking the $population closure.

Returns
‪object|null The instance (hopefully) returned

Definition at line 74 of file LazyLoadingProxy.php.

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

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

◆ current()

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

Returns the current value of the storage array

Definition at line 189 of file LazyLoadingProxy.php.

◆ getUid()

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

◆ key()

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

Returns the current key storage array

Returns
‪int|string|null

Definition at line 200 of file LazyLoadingProxy.php.

◆ next()

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

Returns the next position of the storage array

Definition at line 210 of file LazyLoadingProxy.php.

◆ rewind()

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

Resets the array pointer of the storage

Definition at line 220 of file LazyLoadingProxy.php.

◆ valid()

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

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

Definition at line 230 of file LazyLoadingProxy.php.

Member Data Documentation

◆ $dataMapper

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

◆ $fieldValue

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

◆ $parentObject

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

The object this property is contained in.

Definition at line 37 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 43 of file LazyLoadingProxy.php.

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