Commit Graph

67 Commits

Author SHA1 Message Date
fabien b721f043cd renamed getTemplateName to getTemplateClass
git-svn-id: http://svn.twig-project.org/trunk@131 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-11 16:55:35 +00:00
fabien 03e02718d6 simplified cache management
git-svn-id: http://svn.twig-project.org/trunk@130 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-11 16:51:39 +00:00
fabien 84113a960c optimized template loading as the source code is now never fetched if the cache exists and autoreload is false (which should be the case for websites in production)
git-svn-id: http://svn.twig-project.org/trunk@129 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-11 16:46:52 +00:00
fabien 7d913df23f added setEnvironment to the Twig_LoaderInterface
git-svn-id: http://svn.twig-project.org/trunk@128 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-11 16:33:33 +00:00
fabien 688e4bb653 made Twig_Loader::getTemplateName() the only method that knows how to create a template class name
git-svn-id: http://svn.twig-project.org/trunk@127 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-11 16:31:21 +00:00
fabien 74dbd388dc fixed output when an error occurs in a template and render() is used (closes #23)
git-svn-id: http://svn.twig-project.org/trunk@126 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-10 21:39:18 +00:00
fabien 60158e16f1 made a optimization when a loop iterator also implements Countable
git-svn-id: http://svn.twig-project.org/trunk@120 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-08 08:22:36 +00:00
fabien f01728426f made more changes to use iterator_to_array()
git-svn-id: http://svn.twig-project.org/trunk@119 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-08 08:05:13 +00:00
fabien 588fb93097 made a huge optimization for loops (again)
git-svn-id: http://svn.twig-project.org/trunk@118 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-07 22:18:56 +00:00
fabien 9cfb40b0fa made a huge optimization for loops (up to 50% faster now)
git-svn-id: http://svn.twig-project.org/trunk@117 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-07 19:48:10 +00:00
fabien 1bb24438b5 made small optimizations to for loops
git-svn-id: http://svn.twig-project.org/trunk@116 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-07 19:11:44 +00:00
fabien 1c9566f007 made a small optimization when iterating over an Iterator
git-svn-id: http://svn.twig-project.org/trunk@115 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-07 18:54:37 +00:00
fabien 452dc15ae1 added public properties support
git-svn-id: http://svn.twig-project.org/trunk@113 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-05 17:31:02 +00:00
fabien c7e8e88cc9 added support for expression for the set tag
git-svn-id: http://svn.twig-project.org/trunk@112 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-05 17:18:08 +00:00
fabien 9cfbe3d3dd fixed \ usage in a HTML string
git-svn-id: http://svn.twig-project.org/trunk@111 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-11-05 17:06:00 +00:00
fabien c8f67b6061 made the set tag more powerful
git-svn-id: http://svn.twig-project.org/trunk@103 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-27 16:31:56 +00:00
fabien 3494bc233a added a debug tag
git-svn-id: http://svn.twig-project.org/trunk@90 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-22 01:56:15 +00:00
fabien e04739bbc3 made Node constructors coherent
git-svn-id: http://svn.twig-project.org/trunk@89 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-22 01:47:20 +00:00
fabien 43a1668343 allows macros to have the same kind of logic than the one in regular templates
git-svn-id: http://svn.twig-project.org/trunk@88 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-22 01:30:27 +00:00
fabien 79c4094679 fixed iterators with non-array values
git-svn-id: http://svn.twig-project.org/trunk@87 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-22 01:29:43 +00:00
fabien 554031dc70 added an exception of a template path does not exist
git-svn-id: http://svn.twig-project.org/trunk@85 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-22 00:44:44 +00:00
fabien b12d2f3df3 made a speed optimization for template inclusion and when including the same template over and over again
git-svn-id: http://svn.twig-project.org/trunk@84 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-20 12:00:02 +00:00
fabien fc798571f9 changed the cache extension to .php (closes #15)
git-svn-id: http://svn.twig-project.org/trunk@83 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-20 04:46:30 +00:00
fabien 2bb3c75450 fixed unreachable code in filesystem loader skips security exception (closes #17)
git-svn-id: http://svn.twig-project.org/trunk@82 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-20 04:45:04 +00:00
fabien 4a5173151d added a js escaping strategy
git-svn-id: http://svn.twig-project.org/trunk@81 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-20 04:25:01 +00:00
fabien 7a4f63da2c added support for short block tag
git-svn-id: http://svn.twig-project.org/trunk@76 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-18 22:53:21 +00:00
fabien 22a5723159 changed the filter tag to allow chained filters
git-svn-id: http://svn.twig-project.org/trunk@75 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-18 22:52:37 +00:00
fabien 6cae4bac4a made lexer more flexible as you can now change the default delimiters
git-svn-id: http://svn.twig-project.org/trunk@74 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-18 22:51:34 +00:00
fabien 2674ea2755 added set tag
git-svn-id: http://svn.twig-project.org/trunk@73 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-18 22:50:16 +00:00
fabien f07bd4f150 fix coding standard
git-svn-id: http://svn.twig-project.org/trunk@72 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-18 22:49:31 +00:00
fabien e511ec0802 changed default directory permission when cache dir does not exist (closes #6)
git-svn-id: http://svn.twig-project.org/trunk@68 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-17 11:58:25 +00:00
fabien c25913eabd made a small optimization (closes #12, thanks to tedivm)
git-svn-id: http://svn.twig-project.org/trunk@67 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-17 11:56:28 +00:00
fabien d3bf9d2d9d added parent constructor call in Twig_SyntaxError
git-svn-id: http://svn.twig-project.org/trunk@66 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-16 07:53:36 +00:00
fabien abc9c5d5ca added macro support
git-svn-id: http://svn.twig-project.org/trunk@65 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-16 07:51:42 +00:00
fabien 49117dd863 changed filter first argument to be a Twig_Environment instead of Twig_Template
git-svn-id: http://svn.twig-project.org/trunk@64 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-16 06:55:35 +00:00
fabien aa08e57a14 removed old files
git-svn-id: http://svn.twig-project.org/trunk@63 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-16 06:24:06 +00:00
fabien fbb778598d removed old files
git-svn-id: http://svn.twig-project.org/trunk@62 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-16 06:22:43 +00:00
fabien 7ce2c3dba1 made Twig_Autoloader::autoload() a static method
git-svn-id: http://svn.twig-project.org/trunk@57 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-15 06:30:49 +00:00
fabien 6f535bc859 avoid writing template file if an error occurs
git-svn-id: http://svn.twig-project.org/trunk@56 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-15 06:06:17 +00:00
fabien d11a3307ea added $ escaping when outputting raw strings
git-svn-id: http://svn.twig-project.org/trunk@55 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-15 05:17:37 +00:00
fabien f63d478b9b enhanced filesystem loader error when a template is not found
git-svn-id: http://svn.twig-project.org/trunk@54 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-15 05:17:06 +00:00
fabien 92b715f5c8 fixed empty cache files when the template contains an error (closes #8)
git-svn-id: http://svn.twig-project.org/trunk@53 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 14:25:20 +00:00
fabien 84bfd2da12 changed dev version to 0.9.2
git-svn-id: http://svn.twig-project.org/trunk@51 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 14:16:58 +00:00
fabien 18cbb5f694 fixed typo
git-svn-id: http://svn.twig-project.org/trunk@47 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 08:31:56 +00:00
fabien 5041a6e657 changed PHP 5.2.6 fix (thanks luniki for the idea)
git-svn-id: http://svn.twig-project.org/trunk@46 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 08:30:47 +00:00
fabien af5af131b4 changed dev version
git-svn-id: http://svn.twig-project.org/trunk@45 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 08:24:30 +00:00
fabien 2cfb51a143 added a rewind() method to the token stream
git-svn-id: http://svn.twig-project.org/trunk@42 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 08:08:04 +00:00
fabien 9fa9485df2 fixed look() method, added tests
git-svn-id: http://svn.twig-project.org/trunk@41 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 07:41:24 +00:00
fabien 84684d9d64 added the possibility look more than one token in the token stream
git-svn-id: http://svn.twig-project.org/trunk@40 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 06:39:47 +00:00
fabien f601832cf9 added a setPaths() method to the filesystem loader
git-svn-id: http://svn.twig-project.org/trunk@39 93ef8e89-cb99-4229-a87c-7fa0fa45744b
2009-10-14 05:12:46 +00:00