PropertyAccessorBuilder
in package
A configurable builder to create a PropertyAccessor.
Tags
Table of Contents
- $cacheItemPool : CacheItemPoolInterface|null
- $magicCall : mixed
- $throwExceptionOnInvalidIndex : mixed
- $throwExceptionOnInvalidPropertyPath : mixed
- disableExceptionOnInvalidIndex() : $this
- Disables exceptions when reading a non-existing index.
- disableExceptionOnInvalidPropertyPath() : $this
- Disables exceptions when reading a non-existing index.
- disableMagicCall() : $this
- Disables the use of "__call" by the PropertyAccessor.
- enableExceptionOnInvalidIndex() : $this
- Enables exceptions when reading a non-existing index.
- enableExceptionOnInvalidPropertyPath() : $this
- Enables exceptions when reading a non-existing property.
- enableMagicCall() : $this
- Enables the use of "__call" by the PropertyAccessor.
- getCacheItemPool() : CacheItemPoolInterface|null
- Gets the used cache system.
- getPropertyAccessor() : PropertyAccessorInterface
- Builds and returns a new PropertyAccessor object.
- isExceptionOnInvalidIndexEnabled() : bool
- isExceptionOnInvalidPropertyPath() : bool
- isMagicCallEnabled() : bool
- setCacheItemPool() : PropertyAccessorBuilder
- Sets a cache system.
Properties
$cacheItemPool
private
CacheItemPoolInterface|null
$cacheItemPool
$magicCall
private
mixed
$magicCall
= false
$throwExceptionOnInvalidIndex
private
mixed
$throwExceptionOnInvalidIndex
= false
$throwExceptionOnInvalidPropertyPath
private
mixed
$throwExceptionOnInvalidPropertyPath
= true
Methods
disableExceptionOnInvalidIndex()
Disables exceptions when reading a non-existing index.
public
disableExceptionOnInvalidIndex() : $this
Instead, null is returned when calling PropertyAccessorInterface::getValue() on a non-existing index.
Return values
$this —disableExceptionOnInvalidPropertyPath()
Disables exceptions when reading a non-existing index.
public
disableExceptionOnInvalidPropertyPath() : $this
Instead, null is returned when calling PropertyAccessorInterface::getValue() on a non-existing index.
Return values
$this —disableMagicCall()
Disables the use of "__call" by the PropertyAccessor.
public
disableMagicCall() : $this
Return values
$this —enableExceptionOnInvalidIndex()
Enables exceptions when reading a non-existing index.
public
enableExceptionOnInvalidIndex() : $this
This has no influence on writing non-existing indices with PropertyAccessorInterface::setValue() which are always created on-the-fly.
Return values
$this —enableExceptionOnInvalidPropertyPath()
Enables exceptions when reading a non-existing property.
public
enableExceptionOnInvalidPropertyPath() : $this
This has no influence on writing non-existing indices with PropertyAccessorInterface::setValue() which are always created on-the-fly.
Return values
$this —enableMagicCall()
Enables the use of "__call" by the PropertyAccessor.
public
enableMagicCall() : $this
Return values
$this —getCacheItemPool()
Gets the used cache system.
public
getCacheItemPool() : CacheItemPoolInterface|null
Return values
CacheItemPoolInterface|null —getPropertyAccessor()
Builds and returns a new PropertyAccessor object.
public
getPropertyAccessor() : PropertyAccessorInterface
Return values
PropertyAccessorInterface —The built PropertyAccessor
isExceptionOnInvalidIndexEnabled()
public
isExceptionOnInvalidIndexEnabled() : bool
Return values
bool —whether an exception is thrown or null is returned when reading a non-existing index
isExceptionOnInvalidPropertyPath()
public
isExceptionOnInvalidPropertyPath() : bool
Return values
bool —whether an exception is thrown or null is returned when reading a non-existing property
isMagicCallEnabled()
public
isMagicCallEnabled() : bool
Return values
bool —whether the use of "__call" by the PropertyAccessor is enabled
setCacheItemPool()
Sets a cache system.
public
setCacheItemPool([CacheItemPoolInterface $cacheItemPool = null ]) : PropertyAccessorBuilder
Parameters
- $cacheItemPool : CacheItemPoolInterface = null
Return values
PropertyAccessorBuilder —The builder object