Fabien Potencier
8809a1cab1
changed as to = for the set tag and removed the need for as in short-notation of the block tag ( closes #54 )
2010-06-09 08:20:51 +02:00
Fabien Potencier
0ca17abc71
added a grammar to easily describe a tag syntax with a string
2010-06-08 16:31:06 +02:00
Fabien Potencier
d47902c7b9
fixed the for tag for large arrays ( closes #64 - based on an idea from gwilym - aeb56f9f966bd23b77d35c87999be0606dbb3f47)
2010-06-07 11:04:23 +02:00
Fabien Potencier
56318ee4a8
made a big refactoring of Twig internals (and added a bunch of unit tests and phpdoc, fixes #53 )
2010-06-03 08:12:58 +02:00
Fabien Potencier
28bbe6f2de
renamed ignore_invalid_vars to strict_variables
2010-05-28 07:59:29 +02:00
Fabien Potencier
92ae9ac854
fixed iterator_to_array() usage ( closes #57 )
2010-05-27 18:42:51 +02:00
Fabien Potencier
1847634d0c
changed the date filter to support any date format supported by DateTime ( closes #56 )
2010-05-27 18:32:02 +02:00
Fabien Potencier
63a52ae7de
added ignore_invalid_variables setting to throw an exception when an invalid variable is used in a template
2010-05-26 13:56:43 +02:00
Fabien Potencier
c7fbd4307a
added the lexer, parser, and compiler as arguments to the Twig_Environment constructor
2010-05-26 13:52:49 +02:00
Fabien Potencier
dc80fe13c8
changed the cache option to only accepts an explicit path to a cache directory or false
2010-05-26 13:34:30 +02:00
Fabien Potencier
255f0fb80d
added a way to add token parsers, filters, and visitors without creating an extension
2010-05-26 11:28:06 +02:00
Fabien Potencier
c4e80ee525
added Twig_FilterInterface
2010-05-26 11:26:38 +02:00
Fabien Potencier
6d39e22499
added two interfaces: Twig_NodeInterface and Twig_TokenParserInterface
2010-05-26 07:49:34 +02:00
Fabien Potencier
d4534e8419
changed the generated code to match the new coding standards
2010-05-25 18:11:01 +02:00
Fabien Potencier
b63205a6c4
fixed sandbox mode (__toString() method check was not enforced if called implicitly from a simple statement like {{ article }})
2010-05-25 18:01:55 +02:00
Fabien Potencier
7603ef193b
changed the grammar for the short-notation of the block tag to be more consistent with other tags
2010-05-25 16:43:30 +02:00
Fabien Potencier
9c253d699b
added an exception when a child template has a non-empty body (as it is always ignored when rendering)
2010-05-20 10:43:29 +02:00
Fabien Potencier
bfb861badd
bumped version for development
2010-05-12 12:06:28 +02:00
Fabien Potencier
2ea01af065
updated CHANGELOG and bumped version to 0.9.6
2010-05-12 12:05:37 +02:00
Fabien Potencier
2e1b12bcce
fixed variables defined outside a loop and for which the value changes in a for loop ( closes #43 )
2010-05-11 11:54:06 +02:00
Fabien Potencier
276a3804c5
updated CHANGELOG
2010-05-10 19:33:30 +02:00
Fabien Potencier
79e5058611
added support for __call() in expression resolution ( closes #2 )
...
The new algorithm for object method resolution is now the following:
* get all methods declared for `$object` using ReflectionObject::getMethods()
* check if `$item` is in the list of method names
* check if `get$item` is in the list of method names
* check if `__call` is defined and pass `$item` as the method name
2010-05-10 12:47:39 +02:00
Fabien Potencier
23a8d39d66
fixed nested block definitions with a parent call ( closes #45 )
2010-04-29 07:58:52 +02:00
Fabien Potencier
075f541547
added the cycle filter ( closes #26 )
2010-03-28 15:25:15 +02:00
Fabien Potencier
6b6d515030
fixed the Lexer when mbstring.func_overload is used with an mbstring.internal_encoding different from ASCII ( closes #32 )
2010-03-28 15:10:36 +02:00
Fabien Potencier
029bb5b5a8
added a long-syntax for the set tag ({% set foo %}...{% endset %}) ( closes #25 )
2010-03-25 11:38:43 +01:00
Fabien Potencier
7e8cdd7b4f
switched to PHPUnit for testing
2010-03-19 15:32:39 +01:00
Fabien Potencier
4625d2f861
added the i18n extension ( closes #23 )
2010-03-17 20:39:34 +01:00
Fabien Potencier
94151eab8d
updated CHANGELOG
2010-03-04 11:15:13 +01:00
Fabien Potencier
6c7d5603ea
added support for escaping strategy in the autoescape tag ( closes #19 )
2010-03-04 11:08:16 +01:00
Fabien Potencier
11c00dccf3
updated CHANGELOG
2010-01-26 08:18:46 +01:00
fabien
29d16d9940
bumped version for development
...
git-svn-id: http://svn.twig-project.org/trunk@232 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2010-01-20 10:15:36 +00:00
fabien
83041be523
updated CHANGELOG and bumped version
...
git-svn-id: http://svn.twig-project.org/trunk@228 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2010-01-20 09:38:50 +00:00
fabien
47d5f85c11
added a not in the CHANGELOG about flushing the template cache
...
git-svn-id: http://svn.twig-project.org/trunk@224 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2010-01-08 16:15:16 +00:00
fabien
84bf02bbc2
updated CHANGELOG
...
git-svn-id: http://svn.twig-project.org/trunk@220 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2010-01-08 15:20:34 +00:00
fabien
83ea0a5eca
added the "without loop" option to the for tag (it disables the generation of the loop variable)
...
git-svn-id: http://svn.twig-project.org/trunk@216 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2010-01-08 13:16:37 +00:00
fabien
da5902593f
-
...
git-svn-id: http://svn.twig-project.org/trunk@212 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2010-01-06 15:05:14 +00:00
fabien
575ed89d19
added the // operator (like in Jinja2, closes #44 )
...
git-svn-id: http://svn.twig-project.org/trunk@208 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2010-01-06 08:19:36 +00:00
fabien
92d96e2eab
refactored node transformers to node visitors
...
git-svn-id: http://svn.twig-project.org/trunk@201 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-22 14:13:11 +00:00
fabien
e2c7b2fadd
added a way to specify variables to pass to an included template
...
git-svn-id: http://svn.twig-project.org/trunk@190 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-15 08:01:13 +00:00
fabien
2f0d54d0c9
made auto-escaping more configurable with the new is_escaper option
...
git-svn-id: http://svn.twig-project.org/trunk@186 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-15 07:15:46 +00:00
fabien
5c35e8a0d7
added the floor filter
...
git-svn-id: http://svn.twig-project.org/trunk@184 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-14 19:29:23 +00:00
fabien
9d4ceb4563
changed the automatic-escaping rules to be more sensible (the documentation lists all the rules)
...
git-svn-id: http://svn.twig-project.org/trunk@182 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-14 16:57:54 +00:00
fabien
215ed4864d
improved the filter system to allow object methods to be used as filters
...
git-svn-id: http://svn.twig-project.org/trunk@180 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-14 15:29:19 +00:00
fabien
be7245cb35
changed the Array and String loaders to actually make use of the cache mechanism
...
git-svn-id: http://svn.twig-project.org/trunk@178 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-14 07:05:06 +00:00
fabien
1a033bab6f
included the default filter function definitions in the extension class files directly (Core, Escaper)
...
git-svn-id: http://svn.twig-project.org/trunk@176 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-14 06:46:16 +00:00
fabien
2ab4dd5be0
added the .. operator as a syntactic sugar for the range filter when the step is 1
...
git-svn-id: http://svn.twig-project.org/trunk@173 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-13 15:13:38 +00:00
fabien
87ba224cd4
added the range filter
...
git-svn-id: http://svn.twig-project.org/trunk@171 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-13 13:26:07 +00:00
fabien
95d5cefdd7
added the in operator
...
git-svn-id: http://svn.twig-project.org/trunk@170 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-13 13:03:07 +00:00
fabien
5a49c956bf
added the in filter
...
git-svn-id: http://svn.twig-project.org/trunk@167 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-12-13 12:40:43 +00:00