Property paths
Last updated
Was this helpful?
We use Symfony's PropertyAccess component to help read and write data.
To access array properties use the index notation, specifying array keys within square brackets.
Access $data['name']:
[name]Access $data['people']['name']:
[people][name]Access $data['people']['categories'][0]:
[people][categories][0]To access object properties use the dot notation, specifying object properties separated by a dot character.
Access $data->name:
nameAccess $data->people->name:
people.nameAccess $data->people->categories[0]:
Last updated
Was this helpful?
Was this helpful?
people.name.categories[0]