Symfony\Component\PropertyAccess\PropertyAccessor::readIndex
Reads a key from an array-like structure.
Signature
private function readIndex(ArrayAccess|array&
$array,
string|integer
$index )
Parameters
$array
— object- The array or \ArrayAccess object to read from
$index
— object- The key to read
Returns
- mixed
- The value of the key
Errors/Exceptions
-
NoSuchPropertyException
- If the array does not implement \ArrayAccess or it is not an array