DISALLOW_MAGIC_METHODS
DISALLOW_MAGIC_METHODS = \Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::DISALLOW_MAGIC_METHODS : int
Default implementation of {@link PropertyAccessorInterface}.
$cacheItemPool : \Psr\Cache\CacheItemPoolInterface
$readInfoExtractor : \Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface
$writeInfoExtractor : \Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface
__construct(int $magicMethods = self::MAGIC_GET | self::MAGIC_SET, bool $throwExceptionOnInvalidIndex = false, \Psr\Cache\CacheItemPoolInterface $cacheItemPool = null, bool $throwExceptionOnInvalidPropertyPath = true, \Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface $readInfoExtractor = null, \Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface $writeInfoExtractor = null) : mixed
Should not be used by application code. Use {@link PropertyAccess::createPropertyAccessor()} instead.
int | $magicMethods | A bitwise combination of the MAGIC_* constants to specify the allowed magic methods (__get, __set, __call) or self::DISALLOW_MAGIC_METHODS for none |
bool | $throwExceptionOnInvalidIndex | |
\Psr\Cache\CacheItemPoolInterface | $cacheItemPool | |
bool | $throwExceptionOnInvalidPropertyPath | |
\Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface | $readInfoExtractor | |
\Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface | $writeInfoExtractor |
getValue(mixed $objectOrArray, mixed $propertyPath) : mixed
Returns the value at the end of the property path of the object graph.
mixed | $objectOrArray | The object or array to traverse |
mixed | $propertyPath | The property path to read |
The value at the end of the property path
setValue(mixed $objectOrArray, mixed $propertyPath, mixed $value) : mixed
Sets the value at the end of the property path of the object graph.
mixed | $objectOrArray | The object or array to modify |
mixed | $propertyPath | The property path to modify |
mixed | $value | The value to set at the end of the property path |
isReadable(mixed $objectOrArray, mixed $propertyPath) : bool
Returns whether a property path can be read from an object graph.
mixed | $objectOrArray | The object or array to check |
mixed | $propertyPath | The property path to check |
Whether the property path can be read
createCache(string $namespace, int $defaultLifetime, string $version, \Psr\Log\LoggerInterface $logger = null) : \Symfony\Component\Cache\Adapter\AdapterInterface
Creates the APCu adapter if applicable.
string | $namespace | |
int | $defaultLifetime | |
string | $version | |
\Psr\Log\LoggerInterface | $logger |
When the Cache Component isn't available
readPropertiesUntil(array $zval, \Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath, int $lastIndex, bool $ignoreInvalidIndices = true) : array
Reads the path from an object up to a given path index.
array | $zval | |
\Symfony\Component\PropertyAccess\PropertyPathInterface | $propertyPath | |
int | $lastIndex | |
bool | $ignoreInvalidIndices |
if a value within the path is neither object nor array
If a non-existing index is accessed
readIndex(array $zval, string|int $index) : array
Reads a key from an array-like structure.
array | $zval | |
string|int | $index | The key to read |
If the array does not implement \ArrayAccess or it is not an array
readProperty(array $zval, string $property, bool $ignoreInvalidProperty = false) : array
Reads the a property from an object.
array | $zval | |
string | $property | |
bool | $ignoreInvalidProperty |
If $ignoreInvalidProperty is false and the property does not exist or is not public
writeIndex(array $zval, string|int $index, mixed $value) : mixed
Sets the value of an index in a given array-accessible value.
array | $zval | |
string|int | $index | The index to write at |
mixed | $value | The value to write |
If the array does not implement \ArrayAccess or it is not an array
writeProperty(array $zval, string $property, mixed $value) : mixed
Sets the value of a property in the given object.
array | $zval | |
string | $property | |
mixed | $value | The value to write |
if the property does not exist or is not public
writeCollection(array $zval, string $property, iterable $collection, \Symfony\Component\PropertyInfo\PropertyWriteInfo $addMethod, \Symfony\Component\PropertyInfo\PropertyWriteInfo $removeMethod) : mixed
Adjusts a collection-valued property by calling add*() and remove*() methods.
array | $zval | |
string | $property | |
iterable | $collection | |
\Symfony\Component\PropertyInfo\PropertyWriteInfo | $addMethod | |
\Symfony\Component\PropertyInfo\PropertyWriteInfo | $removeMethod |
getPropertyPath(string|\Symfony\Component\PropertyAccess\PropertyPath $propertyPath) : \Symfony\Component\PropertyAccess\PropertyPath
Gets a PropertyPath instance and caches it.
string|\Symfony\Component\PropertyAccess\PropertyPath | $propertyPath |