Commits
-------
c91357d Moved interfaces
Discussion
----------
Moved interfaces
The Countable and IteratorAggregate interfaces have to be part of the Twig_NodeInterface as the Twig_NodeInterface is used as a typehint and the function tries to iterate over its elements.
E.g:
Twig_NodeTraverser::traverseForVisitor
foreach ($node as $k => $n)
Commits
-------
cf03a65 add another example add another example to constant.rst
Discussion
----------
add another example
An example for using the `constant` function
---------------------------------------------------------------------------
by yegeniy at 2011/10/19 09:48:37 -0700
Should be ready.
---------------------------------------------------------------------------
by nikic at 2011/10/19 10:58:01 -0700
I think you should just add that as a line to the other example, so you got this in the end:
```rst
``constant``
============
``constant`` returns the constant value for a given string:
.. code-block:: jinja
{{ some_date|date(constant('DATE_W3C')) }}
{{ constant('Namespace\\Classname::CONSTANT_NAME') }}
```
---------------------------------------------------------------------------
by fabpot at 2011/10/21 07:24:32 -0700
That's indeed a good addition to the doc. Can you squash your commits in to one before I merge this pull request? Thanks.
---------------------------------------------------------------------------
by yegeniy at 2011/10/22 06:28:58 -0700
Thanks!
Commits
-------
5fa0094 Added Capability to format DateInterval via twig date filter
Discussion
----------
Added Capability to format DateInterval via twig date filter
hi,
i was wondering why twig couldn't format my DateInterval and added it.
Either this is ok for you or we should add something similar for DateInterval because it uses a little bit different syntax to format its string (e.g. prepend with "%")
Cheers Phil
Commits
-------
68ec644 FloorDiv (//) should return integer value according to documentation
Discussion
----------
FloorDiv (//) should return integer value according to documentation