TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
LazyLoadingProxy Class Reference
Inheritance diagram for LazyLoadingProxy:
LoadingStrategyInterface

Public Member Functions

 injectDataMapper (\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper)
 
 __construct ($parentObject, $propertyName, $fieldValue)
 
 _loadRealInstance ()
 
 __call ($methodName, $arguments)
 
 __get ($propertyName)
 
 __set ($propertyName, $value)
 
 __isset ($propertyName)
 
 __unset ($propertyName)
 
 __toString ()
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Protected Attributes

 $dataMapper
 

Private Attributes

 $parentObject
 
 $propertyName
 
 $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).

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

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

Member Function Documentation

__call (   $methodName,
  $arguments 
)

Magic method call implementation.

Parameters
string$methodNameThe name of the property to get
array$argumentsThe arguments given to the call
Returns
mixed

Definition at line 101 of file LazyLoadingProxy.php.

References LazyLoadingProxy\_loadRealInstance().

__get (   $propertyName)

Magic get call implementation.

Parameters
string$propertyNameThe name of the property to get
Returns
mixed

Definition at line 116 of file LazyLoadingProxy.php.

References LazyLoadingProxy\$propertyName, and LazyLoadingProxy\_loadRealInstance().

__isset (   $propertyName)

Magic isset call implementation.

Parameters
string$propertyNameThe name of the property to check
Returns
bool

Definition at line 141 of file LazyLoadingProxy.php.

__set (   $propertyName,
  $value 
)

Magic set call implementation.

Parameters
string$propertyNameThe name of the property to set
mixed$valueThe value for the property to set
Returns
void

Definition at line 129 of file LazyLoadingProxy.php.

__toString ( )

Magic toString call implementation.

Returns
string

Definition at line 164 of file LazyLoadingProxy.php.

__unset (   $propertyName)

Magic unset call implementation.

Parameters
string$propertyNameThe name of the property to unset
Returns
void

Definition at line 153 of file LazyLoadingProxy.php.

_loadRealInstance ( )

Populate this proxy by asking the $population closure.

Returns
object The instance (hopefully) returned

Definition at line 78 of file LazyLoadingProxy.php.

Referenced by LazyLoadingProxy\__call(), and LazyLoadingProxy\__get().

current ( )

Returns the current value of the storage array

Returns
mixed

Definition at line 175 of file LazyLoadingProxy.php.

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

Definition at line 54 of file LazyLoadingProxy.php.

References LazyLoadingProxy\$dataMapper.

key ( )

Returns the current key storage array

Returns
int

Definition at line 186 of file LazyLoadingProxy.php.

next ( )

Returns the next position of the storage array

Returns
void

Definition at line 197 of file LazyLoadingProxy.php.

rewind ( )

Resets the array pointer of the storage

Returns
void

Definition at line 208 of file LazyLoadingProxy.php.

valid ( )

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

Returns
bool

Definition at line 219 of file LazyLoadingProxy.php.

Member Data Documentation

$dataMapper
protected

Definition at line 28 of file LazyLoadingProxy.php.

Referenced by LazyLoadingProxy\injectDataMapper().

$fieldValue
private

Definition at line 49 of file LazyLoadingProxy.php.

Referenced by LazyLoadingProxy\__construct().

$parentObject
private

Definition at line 35 of file LazyLoadingProxy.php.

Referenced by LazyLoadingProxy\__construct().

$propertyName
private

Definition at line 42 of file LazyLoadingProxy.php.

Referenced by LazyLoadingProxy\__construct(), and LazyLoadingProxy\__get().