mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-05 19:37:15 +00:00
29b020eb2f
Before:
Nodes were accessed via node properties ($node->body)
Attributes were accessed via node array access ($node['name'])
After:
Nodes are accessed via getNode(), setNode(), ... ($node->getNode('body'))
Attributes are accessed via getAttribute(), setAttribute(), ... ($node->getAttribute('name'))
The change was necessary because of side-effects. This is one more time the
demonstration that being explicit is always better than magic ;)