4 {{ attribute(obj, method) }}
5 {{ attribute(array, item) }}
6 {{ attribute(obj, "bar", ["a", "b"]) }}
7 {{ attribute(obj, "bar", arguments) }}
8 {{ attribute(obj, method) is defined ? 'ok' : 'ko' }}
9 {{ attribute(obj, nonmethod) is defined ? 'ok' : 'ko' }}
11 return array('obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo', 'nonmethod' => 'xxx', 'arguments' => array('a', 'b'))