5 The ``attribute`` function was added in Twig 1.2.
7 The ``attribute`` function can be used to access a "dynamic" attribute of a
12 {{ attribute(object, method) }}
13 {{ attribute(object, method, arguments) }}
14 {{ attribute(array, item) }}
16 In addition, the ``defined`` test can check for the existence of a dynamic
21 {{ attribute(object, method) is defined ? 'Method exists' : 'Method does not exist' }}
25 The resolution algorithm is the same as the one used for the ``.``
26 notation, except that the item can be any valid expression.