Return the last element of an array, using array_slice().
- Service:
CleverAge\ProcessBundle\Transformer\Array\ArrayLastTransformer - Transformer code:
array_last
array
any: the last element of the array
This transformer has no option.
['foo', 'bar', 'baz']becomes'baz'
# Transformer options level
array_last: ~An empty array triggers an "Undefined array key" warning.