Reads a value from the input (array or object) using a property path, and outputs it.
See the PropertyAccess component documentation for the property path syntax.
- Service:
CleverAge\ProcessBundle\Task\PropertyGetterTask - Code:
property_getter(task: property_getter)
array or object readable by the property accessor at the given property path.
mixed: the value read at the property path.
If the value cannot be read (including a \TypeError of the property accessor, e.g. on a scalar input), the exception
is set on the state (with the property added to the error context) and handled according to the task error_strategy.
| Code | Type | Required | Default | Description |
|---|---|---|---|---|
property |
string |
X | Property path to read from the input |
- Extract the
pathof each file listed by a Flysystem task
# Task configuration level
get_file_path:
task: property_getter
options:
property: 'path'
outputs: [remove_input]- Read a key from an array input
# Task configuration level
get_sku:
task: property_getter
options:
property: '[sku]'
outputs: [next_task]