mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
29b020eb2f029d77ce0d055cf9212b33b787a50e
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 ;)
Twig, the flexible, fast, and secure template language for PHP
Twig is a template language for PHP, released under the new BSD license (code and documentation).
Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment.
Description
Languages
PHP
99.9%