Documentation

PropertyAccessorBuilder
in package

A configurable builder to create a PropertyAccessor.

Tags
author

Jérémie Augustin jeremie.augustin@pixel-cookers.com

Table of Contents

Properties

$cacheItemPool  : CacheItemPoolInterface|null
$magicMethods  : int
$readInfoExtractor  : PropertyReadInfoExtractorInterface|null
$throwExceptionOnInvalidIndex  : mixed
$throwExceptionOnInvalidPropertyPath  : mixed
$writeInfoExtractor  : PropertyWriteInfoExtractorInterface|null

Methods

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.
disableMagicGet()  : $this
Disables the use of "__get" by the PropertyAccessor.
disableMagicMethods()  : $this
Disable the use of all magic methods by the PropertyAccessor.
disableMagicSet()  : $this
Disables the use of "__set" 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.
enableMagicGet()  : self
Enables the use of "__get" by the PropertyAccessor.
enableMagicMethods()  : $this
Enables the use of all magic methods by the PropertyAccessor.
enableMagicSet()  : $this
Enables the use of "__set" by the PropertyAccessor.
getCacheItemPool()  : CacheItemPoolInterface|null
Gets the used cache system.
getPropertyAccessor()  : PropertyAccessorInterface
Builds and returns a new PropertyAccessor object.
getReadInfoExtractor()  : PropertyReadInfoExtractorInterface|null
getWriteInfoExtractor()  : PropertyWriteInfoExtractorInterface|null
isExceptionOnInvalidIndexEnabled()  : bool
isExceptionOnInvalidPropertyPath()  : bool
isMagicCallEnabled()  : bool
isMagicGetEnabled()  : bool
isMagicSetEnabled()  : bool
setCacheItemPool()  : $this
Sets a cache system.
setReadInfoExtractor()  : $this
setWriteInfoExtractor()  : $this

Properties

$magicMethods

private int $magicMethods = \Symfony\Component\PropertyAccess\PropertyAccessor::MAGIC_GET | \Symfony\Component\PropertyAccess\PropertyAccessor::MAGIC_SET

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

disableMagicGet()

Disables the use of "__get" by the PropertyAccessor.

public disableMagicGet() : $this
Return values
$this

disableMagicMethods()

Disable the use of all magic methods by the PropertyAccessor.

public disableMagicMethods() : $this
Return values
$this

disableMagicSet()

Disables the use of "__set" by the PropertyAccessor.

public disableMagicSet() : $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

enableMagicGet()

Enables the use of "__get" by the PropertyAccessor.

public enableMagicGet() : self
Return values
self

enableMagicMethods()

Enables the use of all magic methods by the PropertyAccessor.

public enableMagicMethods() : $this
Return values
$this

enableMagicSet()

Enables the use of "__set" by the PropertyAccessor.

public enableMagicSet() : $this
Return values
$this

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

isMagicGetEnabled()

public isMagicGetEnabled() : bool
Return values
bool

whether the use of "__get" by the PropertyAccessor is enabled

isMagicSetEnabled()

public isMagicSetEnabled() : bool
Return values
bool

whether the use of "__set" by the PropertyAccessor is enabled


        
On this page

Search results