Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

deleting twig-1.8.2

  • Loading branch information...
commit 6aca61ad2ceb9d02ae5a4e3a868d6c637ab92782 1 parent a9857da
@m3nt0r authored
Showing with 0 additions and 21,013 deletions.
  1. +0 −14 vendors/twig-1.8.2/.travis.yml
  2. +0 −9 vendors/twig-1.8.2/AUTHORS
  3. +0 −514 vendors/twig-1.8.2/CHANGELOG
  4. +0 −31 vendors/twig-1.8.2/LICENSE
  5. +0 −17 vendors/twig-1.8.2/README.markdown
  6. +0 −42 vendors/twig-1.8.2/bin/create_pear_package.php
  7. +0 −31 vendors/twig-1.8.2/composer.json
  8. +0 −819 vendors/twig-1.8.2/doc/advanced.rst
  9. +0 −486 vendors/twig-1.8.2/doc/api.rst
  10. +0 −101 vendors/twig-1.8.2/doc/coding_standards.rst
  11. +0 −18 vendors/twig-1.8.2/doc/filters/abs.rst
  12. +0 −11 vendors/twig-1.8.2/doc/filters/capitalize.rst
  13. +0 −22 vendors/twig-1.8.2/doc/filters/convert_encoding.rst
  14. +0 −65 vendors/twig-1.8.2/doc/filters/date.rst
  15. +0 −28 vendors/twig-1.8.2/doc/filters/default.rst
  16. +0 −39 vendors/twig-1.8.2/doc/filters/escape.rst
  17. +0 −16 vendors/twig-1.8.2/doc/filters/format.rst
  18. +0 −30 vendors/twig-1.8.2/doc/filters/index.rst
  19. +0 −18 vendors/twig-1.8.2/doc/filters/join.rst
  20. +0 −14 vendors/twig-1.8.2/doc/filters/json_encode.rst
  21. +0 −11 vendors/twig-1.8.2/doc/filters/keys.rst
  22. +0 −12 vendors/twig-1.8.2/doc/filters/length.rst
  23. +0 −10 vendors/twig-1.8.2/doc/filters/lower.rst
  24. +0 −41 vendors/twig-1.8.2/doc/filters/merge.rst
  25. +0 −22 vendors/twig-1.8.2/doc/filters/nl2br.rst
  26. +0 −38 vendors/twig-1.8.2/doc/filters/number_format.rst
  27. +0 −12 vendors/twig-1.8.2/doc/filters/raw.rst
  28. +0 −14 vendors/twig-1.8.2/doc/filters/replace.rst
  29. +0 −23 vendors/twig-1.8.2/doc/filters/reverse.rst
  30. +0 −57 vendors/twig-1.8.2/doc/filters/slice.rst
  31. +0 −17 vendors/twig-1.8.2/doc/filters/sort.rst
  32. +0 −15 vendors/twig-1.8.2/doc/filters/striptags.rst
  33. +0 −11 vendors/twig-1.8.2/doc/filters/title.rst
  34. +0 −24 vendors/twig-1.8.2/doc/filters/trim.rst
  35. +0 −10 vendors/twig-1.8.2/doc/filters/upper.rst
  36. +0 −14 vendors/twig-1.8.2/doc/filters/url_encode.rst
  37. +0 −18 vendors/twig-1.8.2/doc/functions/attribute.rst
  38. +0 −15 vendors/twig-1.8.2/doc/functions/block.rst
  39. +0 −9 vendors/twig-1.8.2/doc/functions/constant.rst
  40. +0 −20 vendors/twig-1.8.2/doc/functions/cycle.rst
  41. +0 −46 vendors/twig-1.8.2/doc/functions/date.rst
  42. +0 −64 vendors/twig-1.8.2/doc/functions/dump.rst
  43. +0 −15 vendors/twig-1.8.2/doc/functions/index.rst
  44. +0 −20 vendors/twig-1.8.2/doc/functions/parent.rst
  45. +0 −24 vendors/twig-1.8.2/doc/functions/random.rst
  46. +0 −38 vendors/twig-1.8.2/doc/functions/range.rst
  47. +0 −17 vendors/twig-1.8.2/doc/index.rst
  48. +0 −140 vendors/twig-1.8.2/doc/internals.rst
  49. +0 −160 vendors/twig-1.8.2/doc/intro.rst
  50. +0 −362 vendors/twig-1.8.2/doc/recipes.rst
  51. +0 −71 vendors/twig-1.8.2/doc/tags/autoescape.rst
  52. +0 −11 vendors/twig-1.8.2/doc/tags/block.rst
  53. +0 −12 vendors/twig-1.8.2/doc/tags/do.rst
  54. +0 −178 vendors/twig-1.8.2/doc/tags/embed.rst
  55. +0 −187 vendors/twig-1.8.2/doc/tags/extends.rst
  56. +0 −21 vendors/twig-1.8.2/doc/tags/filter.rst
  57. +0 −17 vendors/twig-1.8.2/doc/tags/flush.rst
  58. +0 −157 vendors/twig-1.8.2/doc/tags/for.rst
  59. +0 −8 vendors/twig-1.8.2/doc/tags/from.rst
  60. +0 −43 vendors/twig-1.8.2/doc/tags/if.rst
  61. +0 −79 vendors/twig-1.8.2/doc/tags/import.rst
  62. +0 −86 vendors/twig-1.8.2/doc/tags/include.rst
  63. +0 −24 vendors/twig-1.8.2/doc/tags/index.rst
  64. +0 −91 vendors/twig-1.8.2/doc/tags/macro.rst
  65. +0 −16 vendors/twig-1.8.2/doc/tags/raw.rst
  66. +0 −30 vendors/twig-1.8.2/doc/tags/sandbox.rst
  67. +0 −32 vendors/twig-1.8.2/doc/tags/set.rst
  68. +0 −37 vendors/twig-1.8.2/doc/tags/spaceless.rst
  69. +0 −123 vendors/twig-1.8.2/doc/tags/use.rst
  70. +0 −724 vendors/twig-1.8.2/doc/templates.rst
  71. +0 −11 vendors/twig-1.8.2/doc/tests/constant.rst
  72. +0 −30 vendors/twig-1.8.2/doc/tests/defined.rst
  73. +0 −10 vendors/twig-1.8.2/doc/tests/divisibleby.rst
  74. +0 −11 vendors/twig-1.8.2/doc/tests/empty.rst
  75. +0 −10 vendors/twig-1.8.2/doc/tests/even.rst
  76. +0 −15 vendors/twig-1.8.2/doc/tests/index.rst
  77. +0 −19 vendors/twig-1.8.2/doc/tests/iterable.rst
  78. +0 −12 vendors/twig-1.8.2/doc/tests/null.rst
  79. +0 −10 vendors/twig-1.8.2/doc/tests/odd.rst
  80. +0 −11 vendors/twig-1.8.2/doc/tests/sameas.rst
  81. +0 −30 vendors/twig-1.8.2/ext/twig/.gitignore
  82. +0 −22 vendors/twig-1.8.2/ext/twig/LICENSE
  83. +0 −8 vendors/twig-1.8.2/ext/twig/config.m4
  84. +0 −8 vendors/twig-1.8.2/ext/twig/config.w32
  85. +0 −49 vendors/twig-1.8.2/ext/twig/php_twig.h
  86. +0 −1,025 vendors/twig-1.8.2/ext/twig/twig.c
  87. +0 −46 vendors/twig-1.8.2/lib/Twig/Autoloader.php
  88. +0 −250 vendors/twig-1.8.2/lib/Twig/Compiler.php
  89. +0 −35 vendors/twig-1.8.2/lib/Twig/CompilerInterface.php
  90. +0 −1,104 vendors/twig-1.8.2/lib/Twig/Environment.php
  91. +0 −199 vendors/twig-1.8.2/lib/Twig/Error.php
  92. +0 −20 vendors/twig-1.8.2/lib/Twig/Error/Loader.php
  93. +0 −21 vendors/twig-1.8.2/lib/Twig/Error/Runtime.php
  94. +0 −21 vendors/twig-1.8.2/lib/Twig/Error/Syntax.php
  95. +0 −488 vendors/twig-1.8.2/lib/Twig/ExpressionParser.php
  96. +0 −93 vendors/twig-1.8.2/lib/Twig/Extension.php
  97. +0 −1,039 vendors/twig-1.8.2/lib/Twig/Extension/Core.php
  98. +0 −70 vendors/twig-1.8.2/lib/Twig/Extension/Debug.php
  99. +0 −106 vendors/twig-1.8.2/lib/Twig/Extension/Escaper.php
  100. +0 −35 vendors/twig-1.8.2/lib/Twig/Extension/Optimizer.php
  101. +0 −112 vendors/twig-1.8.2/lib/Twig/Extension/Sandbox.php
  102. +0 −84 vendors/twig-1.8.2/lib/Twig/ExtensionInterface.php
  103. +0 −75 vendors/twig-1.8.2/lib/Twig/Filter.php
  104. +0 −33 vendors/twig-1.8.2/lib/Twig/Filter/Function.php
  105. +0 −35 vendors/twig-1.8.2/lib/Twig/Filter/Method.php
  106. +0 −37 vendors/twig-1.8.2/lib/Twig/Filter/Node.php
  107. +0 −40 vendors/twig-1.8.2/lib/Twig/FilterInterface.php
  108. +0 −63 vendors/twig-1.8.2/lib/Twig/Function.php
  109. +0 −34 vendors/twig-1.8.2/lib/Twig/Function/Function.php
  110. +0 −36 vendors/twig-1.8.2/lib/Twig/Function/Method.php
  111. +0 −37 vendors/twig-1.8.2/lib/Twig/Function/Node.php
  112. +0 −37 vendors/twig-1.8.2/lib/Twig/FunctionInterface.php
  113. +0 −406 vendors/twig-1.8.2/lib/Twig/Lexer.php
  114. +0 −29 vendors/twig-1.8.2/lib/Twig/LexerInterface.php
  115. +0 −102 vendors/twig-1.8.2/lib/Twig/Loader/Array.php
  116. +0 −100 vendors/twig-1.8.2/lib/Twig/Loader/Chain.php
  117. +0 −152 vendors/twig-1.8.2/lib/Twig/Loader/Filesystem.php
  118. +0 −59 vendors/twig-1.8.2/lib/Twig/Loader/String.php
  119. +0 −53 vendors/twig-1.8.2/lib/Twig/LoaderInterface.php
  120. +0 −38 vendors/twig-1.8.2/lib/Twig/Markup.php
  121. +0 −227 vendors/twig-1.8.2/lib/Twig/Node.php
  122. +0 −40 vendors/twig-1.8.2/lib/Twig/Node/AutoEscape.php
  123. +0 −45 vendors/twig-1.8.2/lib/Twig/Node/Block.php
  124. +0 −38 vendors/twig-1.8.2/lib/Twig/Node/BlockReference.php
  125. +0 −20 vendors/twig-1.8.2/lib/Twig/Node/Body.php
  126. +0 −39 vendors/twig-1.8.2/lib/Twig/Node/Do.php
  127. +0 −39 vendors/twig-1.8.2/lib/Twig/Node/Embed.php
  128. +0 −21 vendors/twig-1.8.2/lib/Twig/Node/Expression.php
  129. +0 −86 vendors/twig-1.8.2/lib/Twig/Node/Expression/Array.php
  130. +0 −28 vendors/twig-1.8.2/lib/Twig/Node/Expression/AssignName.php
  131. +0 −40 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary.php
  132. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Add.php
  133. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/And.php
  134. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/BitwiseAnd.php
  135. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/BitwiseOr.php
  136. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/BitwiseXor.php
  137. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Concat.php
  138. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Div.php
  139. +0 −17 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Equal.php
  140. +0 −29 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/FloorDiv.php
  141. +0 −17 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Greater.php
  142. +0 −17 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/GreaterEqual.php
  143. +0 −33 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/In.php
  144. +0 −17 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Less.php
  145. +0 −17 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/LessEqual.php
  146. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Mod.php
  147. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Mul.php
  148. +0 −17 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/NotEqual.php
  149. +0 −33 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/NotIn.php
  150. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Or.php
  151. +0 −33 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Power.php
  152. +0 −33 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Range.php
  153. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Binary/Sub.php
  154. +0 −52 vendors/twig-1.8.2/lib/Twig/Node/Expression/BlockReference.php
  155. +0 −31 vendors/twig-1.8.2/lib/Twig/Node/Expression/Conditional.php
  156. +0 −23 vendors/twig-1.8.2/lib/Twig/Node/Expression/Constant.php
  157. +0 −34 vendors/twig-1.8.2/lib/Twig/Node/Expression/ExtensionReference.php
  158. +0 −61 vendors/twig-1.8.2/lib/Twig/Node/Expression/Filter.php
  159. +0 −44 vendors/twig-1.8.2/lib/Twig/Node/Expression/Filter/Default.php
  160. +0 −66 vendors/twig-1.8.2/lib/Twig/Node/Expression/Function.php
  161. +0 −53 vendors/twig-1.8.2/lib/Twig/Node/Expression/GetAttr.php
  162. +0 −37 vendors/twig-1.8.2/lib/Twig/Node/Expression/MethodCall.php
  163. +0 −76 vendors/twig-1.8.2/lib/Twig/Node/Expression/Name.php
  164. +0 −48 vendors/twig-1.8.2/lib/Twig/Node/Expression/Parent.php
  165. +0 −26 vendors/twig-1.8.2/lib/Twig/Node/Expression/TempName.php
  166. +0 −54 vendors/twig-1.8.2/lib/Twig/Node/Expression/Test.php
  167. +0 −36 vendors/twig-1.8.2/lib/Twig/Node/Expression/Test/Constant.php
  168. +0 −55 vendors/twig-1.8.2/lib/Twig/Node/Expression/Test/Defined.php
  169. +0 −34 vendors/twig-1.8.2/lib/Twig/Node/Expression/Test/Divisibleby.php
  170. +0 −33 vendors/twig-1.8.2/lib/Twig/Node/Expression/Test/Even.php
  171. +0 −32 vendors/twig-1.8.2/lib/Twig/Node/Expression/Test/Null.php
  172. +0 −33 vendors/twig-1.8.2/lib/Twig/Node/Expression/Test/Odd.php
  173. +0 −30 vendors/twig-1.8.2/lib/Twig/Node/Expression/Test/Sameas.php
  174. +0 −30 vendors/twig-1.8.2/lib/Twig/Node/Expression/Unary.php
  175. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Unary/Neg.php
  176. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Unary/Not.php
  177. +0 −18 vendors/twig-1.8.2/lib/Twig/Node/Expression/Unary/Pos.php
  178. +0 −37 vendors/twig-1.8.2/lib/Twig/Node/Flush.php
  179. +0 −113 vendors/twig-1.8.2/lib/Twig/Node/For.php
  180. +0 −56 vendors/twig-1.8.2/lib/Twig/Node/ForLoop.php
  181. +0 −67 vendors/twig-1.8.2/lib/Twig/Node/If.php
  182. +0 −51 vendors/twig-1.8.2/lib/Twig/Node/Import.php
  183. +0 −100 vendors/twig-1.8.2/lib/Twig/Node/Include.php
  184. +0 −84 vendors/twig-1.8.2/lib/Twig/Node/Macro.php
  185. +0 −372 vendors/twig-1.8.2/lib/Twig/Node/Module.php
  186. +0 −40 vendors/twig-1.8.2/lib/Twig/Node/Print.php
  187. +0 −48 vendors/twig-1.8.2/lib/Twig/Node/Sandbox.php
  188. +0 −61 vendors/twig-1.8.2/lib/Twig/Node/SandboxedModule.php
  189. +0 −60 vendors/twig-1.8.2/lib/Twig/Node/SandboxedPrint.php
  190. +0 −102 vendors/twig-1.8.2/lib/Twig/Node/Set.php
  191. +0 −35 vendors/twig-1.8.2/lib/Twig/Node/SetTemp.php
  192. +0 −41 vendors/twig-1.8.2/lib/Twig/Node/Spaceless.php
  193. +0 −40 vendors/twig-1.8.2/lib/Twig/Node/Text.php
  194. +0 −30 vendors/twig-1.8.2/lib/Twig/NodeInterface.php
  195. +0 −20 vendors/twig-1.8.2/lib/Twig/NodeOutputInterface.php
  196. +0 −89 vendors/twig-1.8.2/lib/Twig/NodeTraverser.php
  197. +0 −164 vendors/twig-1.8.2/lib/Twig/NodeVisitor/Escaper.php
  198. +0 −247 vendors/twig-1.8.2/lib/Twig/NodeVisitor/Optimizer.php
  199. +0 −119 vendors/twig-1.8.2/lib/Twig/NodeVisitor/SafeAnalysis.php
  200. +0 −106 vendors/twig-1.8.2/lib/Twig/NodeVisitor/Sandbox.php
  201. +0 −48 vendors/twig-1.8.2/lib/Twig/NodeVisitorInterface.php
  202. +0 −384 vendors/twig-1.8.2/lib/Twig/Parser.php
  203. +0 −28 vendors/twig-1.8.2/lib/Twig/ParserInterface.php
  204. +0 −20 vendors/twig-1.8.2/lib/Twig/Sandbox/SecurityError.php
  205. +0 −120 vendors/twig-1.8.2/lib/Twig/Sandbox/SecurityPolicy.php
  206. +0 −25 vendors/twig-1.8.2/lib/Twig/Sandbox/SecurityPolicyInterface.php
  207. +0 −442 vendors/twig-1.8.2/lib/Twig/Template.php
  208. +0 −47 vendors/twig-1.8.2/lib/Twig/TemplateInterface.php
  209. +0 −31 vendors/twig-1.8.2/lib/Twig/Test/Function.php
  210. +0 −33 vendors/twig-1.8.2/lib/Twig/Test/Method.php
  211. +0 −35 vendors/twig-1.8.2/lib/Twig/Test/Node.php
  212. +0 −26 vendors/twig-1.8.2/lib/Twig/TestInterface.php
  213. +0 −219 vendors/twig-1.8.2/lib/Twig/Token.php
  214. +0 −34 vendors/twig-1.8.2/lib/Twig/TokenParser.php
  215. +0 −88 vendors/twig-1.8.2/lib/Twig/TokenParser/AutoEscape.php
  216. +0 −83 vendors/twig-1.8.2/lib/Twig/TokenParser/Block.php
  217. +0 −42 vendors/twig-1.8.2/lib/Twig/TokenParser/Do.php
  218. +0 −66 vendors/twig-1.8.2/lib/Twig/TokenParser/Embed.php
  219. +0 −54 vendors/twig-1.8.2/lib/Twig/TokenParser/Extends.php
  220. +0 −61 vendors/twig-1.8.2/lib/Twig/TokenParser/Filter.php
  221. +0 −42 vendors/twig-1.8.2/lib/Twig/TokenParser/Flush.php
  222. +0 −89 vendors/twig-1.8.2/lib/Twig/TokenParser/For.php
  223. +0 −74 vendors/twig-1.8.2/lib/Twig/TokenParser/From.php
  224. +0 −93 vendors/twig-1.8.2/lib/Twig/TokenParser/If.php
  225. +0 −47 vendors/twig-1.8.2/lib/Twig/TokenParser/Import.php
  226. +0 −80 vendors/twig-1.8.2/lib/Twig/TokenParser/Include.php
  227. +0 −69 vendors/twig-1.8.2/lib/Twig/TokenParser/Macro.php
  228. +0 −55 vendors/twig-1.8.2/lib/Twig/TokenParser/Sandbox.php
  229. +0 −84 vendors/twig-1.8.2/lib/Twig/TokenParser/Set.php
  230. +0 −59 vendors/twig-1.8.2/lib/Twig/TokenParser/Spaceless.php
  231. +0 −85 vendors/twig-1.8.2/lib/Twig/TokenParser/Use.php
  232. +0 −113 vendors/twig-1.8.2/lib/Twig/TokenParserBroker.php
  233. +0 −45 vendors/twig-1.8.2/lib/Twig/TokenParserBrokerInterface.php
  234. +0 −42 vendors/twig-1.8.2/lib/Twig/TokenParserInterface.php
  235. +0 −145 vendors/twig-1.8.2/lib/Twig/TokenStream.php
  236. +0 −64 vendors/twig-1.8.2/package.xml.tpl
  237. +0 −25 vendors/twig-1.8.2/phpunit.xml.dist
  238. +0 −21 vendors/twig-1.8.2/test/Twig/Tests/AutoloaderTest.php
  239. +0 −33 vendors/twig-1.8.2/test/Twig/Tests/CompilerTest.php
  240. +0 −35 vendors/twig-1.8.2/test/Twig/Tests/EnvironmentTest.php
  241. +0 −100 vendors/twig-1.8.2/test/Twig/Tests/ErrorTest.php
  242. +0 −217 vendors/twig-1.8.2/test/Twig/Tests/ExpressionParserTest.php
  243. +0 −115 vendors/twig-1.8.2/test/Twig/Tests/Extension/CoreTest.php
  244. +0 −209 vendors/twig-1.8.2/test/Twig/Tests/Extension/SandboxTest.php
  245. +0 −70 vendors/twig-1.8.2/test/Twig/Tests/FileCachingTest.php
  246. +0 −20 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/exceptions/unclosed_tag.test
  247. +0 −61 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/array.test
  248. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/array_call.test
  249. +0 −46 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/binary.test
  250. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/bitwise.test
  251. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/comparison.test
  252. +0 −20 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/dotdot.test
  253. +0 −8 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/grouping.test
  254. +0 −22 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/literals.test
  255. +0 −27 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/magic_call.test
  256. +0 −28 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/method_call.test
  257. +0 −21 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/postfix.test
  258. +0 −10 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/strings.test
  259. +0 −18 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/ternary_operator.test
  260. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/unary.test
  261. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/expressions/unary_precedence.test
  262. +0 −30 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/abs.test
  263. +0 −10 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/convert_encoding.test
  264. +0 −56 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/date.test
  265. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/date_default_format.test
  266. +0 −16 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test
  267. +0 −16 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/date_interval.test
  268. +0 −150 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/default.test
  269. +0 −10 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/dynamic_filter.test
  270. +0 −8 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/escape.test
  271. +0 −8 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test
  272. +0 −18 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/force_escape.test
  273. +0 −8 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/format.test
  274. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/join.test
  275. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/json_encode.test
  276. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/length.test
  277. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/length_utf8.test
  278. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/merge.test
  279. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/nl2br.test
  280. +0 −18 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/number_format.test
  281. +0 −21 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/number_format_default.test
  282. +0 −8 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/replace.test
  283. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/reverse.test
  284. +0 −40 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/slice.test
  285. +0 −10 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/sort.test
  286. +0 −8 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/special_chars.test
  287. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/filters/trim.test
  288. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/attribute.test
  289. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/block.test
  290. +0 −12 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/constant.test
  291. +0 −16 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/cycle.test
  292. +0 −25 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/date.test
  293. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/dump.test
  294. +0 −19 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/dump_array.test
  295. +0 −10 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/dynamic_function.test
  296. +0 −8 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/functions/special_chars.test
  297. +0 −22 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/macros/simple.test
  298. +0 −14 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/macros/with_filters.test
  299. +0 −8 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/regression/empty_token.test
  300. +0 −17 vendors/twig-1.8.2/test/Twig/Tests/Fixtures/regression/simple_xml_element.test
Sorry, we could not display the entire diff because too many files (451) changed.
View
14 vendors/twig-1.8.2/.travis.yml
@@ -1,14 +0,0 @@
-language: php
-
-php:
- - 5.2
- - 5.3
- - 5.4
-
-env:
- - TWIG_EXT=no
- - TWIG_EXT=yes
-
-before_script:
- - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && sudo make install"; fi
- - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
View
9 vendors/twig-1.8.2/AUTHORS
@@ -1,9 +0,0 @@
-Twig is written and maintained by the Twig Team:
-
-Lead Developer:
-
-- Fabien Potencier <fabien.potencier@symfony-project.org>
-
-Project Founder:
-
-- Armin Ronacher <armin.ronacher@active-4.com>
View
514 vendors/twig-1.8.2/CHANGELOG
@@ -1,514 +0,0 @@
-* 1.8.2 (2012-05-30)
-
- * added the abs filter
- * fixed a regression when using a number in template attributes
- * fixed compiler when mbstring.func_overload is set to 2
- * fixed DateTimeZone support in date filter
-
-* 1.8.1 (2012-05-17)
-
- * fixed a regression when dealing with SimpleXMLElement instances in templates
- * fixed "is_safe" value for the "dump" function when "html_errors" is not defined in php.ini
- * switched to use mbstring whenever possible instead of iconv
-
-* 1.8.0 (2012-05-08)
-
- * enforced interface when adding tests, filters, functions, and node visitors from extensions
- * fixed a side-effect of the date filter where the timezone might be changed
- * simplified usage of the autoescape tag; the only (optional) argument is now the escaping strategy or false (with a BC layer)
- * added a way to dynamically change the auto-escaping strategy according to the template "filename"
- * changed the autoescape option to also accept a supported escaping strategy (for BC, true is equivalent to html)
- * added an embed tag
-
-* 1.7.0 (2012-04-24)
-
- * fixed a PHP warning when using CIFS
- * fixed template line number in some exceptions
- * added an iterable test
- * added an error when defining two blocks with the same name in a template
- * added the preserves_safety option for filters
- * fixed a PHP notice when trying to access a key on a non-object/array variable
- * enhanced error reporting when the template file is an instance of SplFileInfo
- * added Twig_Environment::mergeGlobals()
- * added compilation checks to avoid misuses of the sandbox tag
- * fixed filesystem loader freshness logic for high traffic websites
- * fixed random function when charset is null
-
-* 1.6.5 (2012-04-11)
-
- * fixed a regression when a template only extends another one without defining any blocks
-
-* 1.6.4 (2012-04-02)
-
- * fixed PHP notice in Twig_Error::guessTemplateLine() introduced in 1.6.3
- * fixed performance when compiling large files
- * optimized parent template creation when the template does not use dynamic inheritance
-
-* 1.6.3 (2012-03-22)
-
- * fixed usage of Z_ADDREF_P for PHP 5.2 in the C extension
- * fixed compilation of numeric values used in templates when using a locale where the decimal separator is not a dot
- * made the strategy used to guess the real template file name and line number in exception messages much faster and more accurate
-
-* 1.6.2 (2012-03-18)
-
- * fixed sandbox mode when used with inheritance
- * added preserveKeys support for the slice filter
- * fixed the date filter when a DateTime instance is passed with a specific timezone
- * added a trim filter
-
-* 1.6.1 (2012-02-29)
-
- * fixed Twig C extension
- * removed the creation of Twig_Markup instances when not needed
- * added a way to set the default global timezone for dates
- * fixed the slice filter on strings when the length is not specified
- * fixed the creation of the cache directory in case of a race condition
-
-* 1.6.0 (2012-02-04)
-
- * fixed raw blocks when used with the whitespace trim option
- * made a speed optimization to macro calls when imported via the "from" tag
- * fixed globals, parsers, visitors, filters, tests, and functions management in Twig_Environment when a new one or new extension is added
- * fixed the attribute function when passing arguments
- * added slice notation support for the [] operator (syntactic sugar for the slice operator)
- * added a slice filter
- * added string support for the reverse filter
- * fixed the empty test and the length filter for Twig_Markup instances
- * added a date function to ease date comparison
- * fixed unary operators precedence
- * added recursive parsing support in the parser
- * added string and integer handling for the random function
-
-* 1.5.1 (2012-01-05)
-
- * fixed a regression when parsing strings
-
-* 1.5.0 (2012-01-04)
-
- * added Traversable objects support for the join filter
-
-* 1.5.0-RC2 (2011-12-30)
-
- * added a way to set the default global date interval format
- * fixed the date filter for DateInterval instances (setTimezone() does not exist for them)
- * refactored Twig_Template::display() to ease its extension
- * added a number_format filter
-
-* 1.5.0-RC1 (2011-12-26)
-
- * removed the need to quote hash keys
- * allowed hash keys to be any expression
- * added a do tag
- * added a flush tag
- * added support for dynamically named filters and functions
- * added a dump function to help debugging templates
- * added a nl2br filter
- * added a random function
- * added a way to change the default format for the date filter
- * fixed the lexer when an operator ending with a letter ends a line
- * added string interpolation support
- * enhanced exceptions for unknown filters, functions, tests, and tags
-
-* 1.4.0 (2011-12-07)
-
- * fixed lexer when using big numbers (> PHP_INT_MAX)
- * added missing preserveKeys argument to the reverse filter
- * fixed macros containing filter tag calls
-
-* 1.4.0-RC2 (2011-11-27)
-
- * removed usage of Reflection in Twig_Template::getAttribute()
- * added a C extension that can optionally replace Twig_Template::getAttribute()
- * added negative timestamp support to the date filter
-
-* 1.4.0-RC1 (2011-11-20)
-
- * optimized variable access when using PHP 5.4
- * changed the precedence of the .. operator to be more consistent with languages that implements such a feature like Ruby
- * added an Exception to Twig_Loader_Array::isFresh() method when the template does not exist to be consistent with other loaders
- * added Twig_Function_Node to allow more complex functions to have their own Node class
- * added Twig_Filter_Node to allow more complex filters to have their own Node class
- * added Twig_Test_Node to allow more complex tests to have their own Node class
- * added a better error message when a template is empty but contain a BOM
- * fixed "in" operator for empty strings
- * fixed the "defined" test and the "default" filter (now works with more than one call (foo.bar.foo) and for both values of the strict_variables option)
- * changed the way extensions are loaded (addFilter/addFunction/addGlobal/addTest/addNodeVisitor/addTokenParser/addExtension can now be called in any order)
- * added Twig_Environment::display()
- * made the escape filter smarter when the encoding is not supported by PHP
- * added a convert_encoding filter
- * moved all node manipulations outside the compile() Node method
- * made several speed optimizations
-
-* 1.3.0 (2011-10-08)
-
-no changes
-
-* 1.3.0-RC1 (2011-10-04)
-
- * added an optimization for the parent() function
- * added cache reloading when auto_reload is true and an extension has been modified
- * added the possibility to force the escaping of a string already marked as safe (instance of Twig_Markup)
- * allowed empty templates to be used as traits
- * added traits support for the "parent" function
-
-* 1.2.0 (2011-09-13)
-
-no changes
-
-* 1.2.0-RC1 (2011-09-10)
-
- * enhanced the exception when a tag remains unclosed
- * added support for empty Countable objects for the "empty" test
- * fixed algorithm that determines if a template using inheritance is valid (no output between block definitions)
- * added better support for encoding problems when escaping a string (available as of PHP 5.4)
- * added a way to ignore a missing template when using the "include" tag ({% include "foo" ignore missing %})
- * added support for an array of templates to the "include" and "extends" tags ({% include ['foo', 'bar'] %})
- * added support for bitwise operators in expressions
- * added the "attribute" function to allow getting dynamic attributes on variables
- * added Twig_Loader_Chain
- * added Twig_Loader_Array::setTemplate()
- * added an optimization for the set tag when used to capture a large chunk of static text
- * changed name regex to match PHP one "[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" (works for blocks, tags, functions, filters, and macros)
- * removed the possibility to use the "extends" tag from a block
- * added "if" modifier support to "for" loops
-
-* 1.1.2 (2011-07-30)
-
- * fixed json_encode filter on PHP 5.2
- * fixed regression introduced in 1.1.1 ({{ block(foo|lower) }})
- * fixed inheritance when using conditional parents
- * fixed compilation of templates when the body of a child template is not empty
- * fixed output when a macro throws an exception
- * fixed a parsing problem when a large chunk of text is enclosed in a comment tag
- * added PHPDoc for all Token parsers and Core extension functions
-
-* 1.1.1 (2011-07-17)
-
- * added a performance optimization in the Optimizer (also helps to lower the number of nested level calls)
- * made some performance improvement for some edge cases
-
-* 1.1.0 (2011-06-28)
-
- * fixed json_encode filter
-
-* 1.1.0-RC3 (2011-06-24)
-
- * fixed method case-sensitivity when using the sandbox mode
- * added timezone support for the date filter
- * fixed possible security problems with NUL bytes
-
-* 1.1.0-RC2 (2011-06-16)
-
- * added an exception when the template passed to "use" is not a string
- * made 'a.b is defined' not throw an exception if a is not defined (in strict mode)
- * added {% line \d+ %} directive
-
-* 1.1.0-RC1 (2011-05-28)
-
-Flush your cache after upgrading.
-
- * fixed date filter when using a timestamp
- * fixed the defined test for some cases
- * fixed a parsing problem when a large chunk of text is enclosed in a raw tag
- * added support for horizontal reuse of template blocks (see docs for more information)
- * added whitespace control modifier to all tags (see docs for more information)
- * added null as an alias for none (the null test is also an alias for the none test now)
- * made TRUE, FALSE, NONE equivalent to their lowercase counterparts
- * wrapped all compilation and runtime exceptions with Twig_Error_Runtime and added logic to guess the template name and line
- * moved display() method to Twig_Template (generated templates should now use doDisplay() instead)
-
-* 1.0.0 (2011-03-27)
-
- * fixed output when using mbstring
- * fixed duplicate call of methods when using the sandbox
- * made the charset configurable for the escape filter
-
-* 1.0.0-RC2 (2011-02-21)
-
- * changed the way {% set %} works when capturing (the content is now marked as safe)
- * added support for macro name in the endmacro tag
- * make Twig_Error compatible with PHP 5.3.0 >
- * fixed an infinite loop on some Windows configurations
- * fixed the "length" filter for numbers
- * fixed Template::getAttribute() as properties in PHP are case sensitive
- * removed coupling between Twig_Node and Twig_Template
- * fixed the ternary operator precedence rule
-
-* 1.0.0-RC1 (2011-01-09)
-
-Backward incompatibilities:
-
- * the "items" filter, which has been deprecated for quite a long time now, has been removed
- * the "range" filter has been converted to a function: 0|range(10) -> range(0, 10)
- * the "constant" filter has been converted to a function: {{ some_date|date('DATE_W3C'|constant) }} -> {{ some_date|date(constant('DATE_W3C')) }}
- * the "cycle" filter has been converted to a function: {{ ['odd', 'even']|cycle(i) }} -> {{ cycle(['odd', 'even'], i) }}
- * the "for" tag does not support "joined by" anymore
- * the "autoescape" first argument is now "true"/"false" (instead of "on"/"off")
- * the "parent" tag has been replaced by a "parent" function ({{ parent() }} instead of {% parent %})
- * the "display" tag has been replaced by a "block" function ({{ block('title') }} instead of {% display title %})
- * removed the grammar and simple token parser (moved to the Twig Extensions repository)
-
-Changes:
-
- * added "needs_context" option for filters and functions (the context is then passed as a first argument)
- * added global variables support
- * made macros return their value instead of echoing directly (fixes calling a macro in sandbox mode)
- * added the "from" tag to import macros as functions
- * added support for functions (a function is just syntactic sugar for a getAttribute() call)
- * made macros callable when sandbox mode is enabled
- * added an exception when a macro uses a reserved name
- * the "default" filter now uses the "empty" test instead of just checking for null
- * added the "empty" test
-
-* 0.9.10 (2010-12-16)
-
-Backward incompatibilities:
-
- * The Escaper extension is enabled by default, which means that all displayed
- variables are now automatically escaped. You can revert to the previous
- behavior by removing the extension via $env->removeExtension('escaper')
- or just set the 'autoescape' option to 'false'.
- * removed the "without loop" attribute for the "for" tag (not needed anymore
- as the Optimizer take care of that for most cases)
- * arrays and hashes have now a different syntax
- * arrays keep the same syntax with square brackets: [1, 2]
- * hashes now use curly braces (["a": "b"] should now be written as {"a": "b"})
- * support for "arrays with keys" and "hashes without keys" is not supported anymore ([1, "foo": "bar"] or {"foo": "bar", 1})
- * the i18n extension is now part of the Twig Extensions repository
-
-Changes:
-
- * added the merge filter
- * removed 'is_escaper' option for filters (a left over from the previous version) -- you must use 'is_safe' now instead
- * fixed usage of operators as method names (like is, in, and not)
- * changed the order of execution for node visitors
- * fixed default() filter behavior when used with strict_variables set to on
- * fixed filesystem loader compatibility with PHAR files
- * enhanced error messages when an unexpected token is parsed in an expression
- * fixed filename not being added to syntax error messages
- * added the autoescape option to enable/disable autoescaping
- * removed the newline after a comment (mimicks PHP behavior)
- * added a syntax error exception when parent block is used on a template that does not extend another one
- * made the Escaper extension enabled by default
- * fixed sandbox extension when used with auto output escaping
- * fixed escaper when wrapping a Twig_Node_Print (the original class must be preserved)
- * added an Optimizer extension (enabled by default; optimizes "for" loops and "raw" filters)
- * added priority to node visitors
-
-* 0.9.9 (2010-11-28)
-
-Backward incompatibilities:
- * the self special variable has been renamed to _self
- * the odd and even filters are now tests:
- {{ foo|odd }} must now be written {{ foo is odd }}
- * the "safe" filter has been renamed to "raw"
- * in Node classes,
- sub-nodes are now accessed via getNode() (instead of property access)
- attributes via getAttribute() (instead of array access)
- * the urlencode filter had been renamed to url_encode
- * the include tag now merges the passed variables with the current context by default
- (the old behavior is still possible by adding the "only" keyword)
- * moved Exceptions to Twig_Error_* (Twig_SyntaxError/Twig_RuntimeError are now Twig_Error_Syntax/Twig_Error_Runtime)
- * removed support for {{ 1 < i < 3 }} (use {{ i > 1 and i < 3 }} instead)
- * the "in" filter has been removed ({{ a|in(b) }} should now be written {{ a in b }})
-
-Changes:
- * added file and line to Twig_Error_Runtime exceptions thrown from Twig_Template
- * changed trans tag to accept any variable for the plural count
- * fixed sandbox mode (__toString() method check was not enforced if called implicitly from complex statements)
- * added the ** (power) operator
- * changed the algorithm used for parsing expressions
- * added the spaceless tag
- * removed trim_blocks option
- * added support for is*() methods for attributes (foo.bar now looks for foo->getBar() or foo->isBar())
- * changed all exceptions to extend Twig_Error
- * fixed unary expressions ({{ not(1 or 0) }})
- * fixed child templates (with an extend tag) that uses one or more imports
- * added support for {{ 1 not in [2, 3] }} (more readable than the current {{ not (1 in [2, 3]) }})
- * escaping has been rewritten
- * the implementation of template inheritance has been rewritten
- (blocks can now be called individually and still work with inheritance)
- * fixed error handling for if tag when a syntax error occurs within a subparse process
- * added a way to implement custom logic for resolving token parsers given a tag name
- * fixed js escaper to be stricter (now uses a whilelist-based js escaper)
- * added the following filers: "constant", "trans", "replace", "json_encode"
- * added a "constant" test
- * fixed objects with __toString() not being autoescaped
- * fixed subscript expressions when calling __call() (methods now keep the case)
- * added "test" feature (accessible via the "is" operator)
- * removed the debug tag (should be done in an extension)
- * fixed trans tag when no vars are used in plural form
- * fixed race condition when writing template cache
- * added the special _charset variable to reference the current charset
- * added the special _context variable to reference the current context
- * renamed self to _self (to avoid conflict)
- * fixed Twig_Template::getAttribute() for protected properties
-
-* 0.9.8 (2010-06-28)
-
-Backward incompatibilities:
- * the trans tag plural count is now attached to the plural tag:
- old: `{% trans count %}...{% plural %}...{% endtrans %}`
- new: `{% trans %}...{% plural count %}...{% endtrans %}`
-
- * added a way to translate strings coming from a variable ({% trans var %})
- * fixed trans tag when used with the Escaper extension
- * fixed default cache umask
- * removed Twig_Template instances from the debug tag output
- * fixed objects with __isset() defined
- * fixed set tag when used with a capture
- * fixed type hinting for Twig_Environment::addFilter() method
-
-* 0.9.7 (2010-06-12)
-
-Backward incompatibilities:
- * changed 'as' to '=' for the set tag ({% set title as "Title" %} must now be {% set title = "Title" %})
- * removed the sandboxed attribute of the include tag (use the new sandbox tag instead)
- * refactored the Node system (if you have custom nodes, you will have to update them to use the new API)
-
- * added self as a special variable that refers to the current template (useful for importing macros from the current template)
- * added Twig_Template instance support to the include tag
- * added support for dynamic and conditional inheritance ({% extends some_var %} and {% extends standalone ? "minimum" : "base" %})
- * added a grammar sub-framework to ease the creation of custom tags
- * fixed the for tag for large arrays (some loop variables are now only available for arrays and objects that implement the Countable interface)
- * removed the Twig_Resource::resolveMissingFilter() method
- * fixed the filter tag which did not apply filtering to included files
- * added a bunch of unit tests
- * added a bunch of phpdoc
- * added a sandbox tag in the sandbox extension
- * changed the date filter to support any date format supported by DateTime
- * added strict_variable setting to throw an exception when an invalid variable is used in a template (disabled by default)
- * added the lexer, parser, and compiler as arguments to the Twig_Environment constructor
- * changed the cache option to only accepts an explicit path to a cache directory or false
- * added a way to add token parsers, filters, and visitors without creating an extension
- * added three interfaces: Twig_NodeInterface, Twig_TokenParserInterface, and Twig_FilterInterface
- * changed the generated code to match the new coding standards
- * fixed sandbox mode (__toString() method check was not enforced if called implicitly from a simple statement like {{ article }})
- * added an exception when a child template has a non-empty body (as it is always ignored when rendering)
-
-* 0.9.6 (2010-05-12)
-
- * fixed variables defined outside a loop and for which the value changes in a for loop
- * fixed the test suite for PHP 5.2 and older versions of PHPUnit
- * added support for __call() in expression resolution
- * fixed node visiting for macros (macros are now visited by visitors as any other node)
- * fixed nested block definitions with a parent call (rarely useful but nonetheless supported now)
- * added the cycle filter
- * fixed the Lexer when mbstring.func_overload is used with an mbstring.internal_encoding different from ASCII
- * added a long-syntax for the set tag ({% set foo %}...{% endset %})
- * unit tests are now powered by PHPUnit
- * added support for gettext via the `i18n` extension
- * fixed twig_capitalize_string_filter() and fixed twig_length_filter() when used with UTF-8 values
- * added a more useful exception if an if tag is not closed properly
- * added support for escaping strategy in the autoescape tag
- * fixed lexer when a template has a big chunk of text between/in a block
-
-* 0.9.5 (2010-01-20)
-
-As for any new release, don't forget to remove all cached templates after
-upgrading.
-
-If you have defined custom filters, you MUST upgrade them for this release. To
-upgrade, replace "array" with "new Twig_Filter_Function", and replace the
-environment constant by the "needs_environment" option:
-
- // before
- 'even' => array('twig_is_even_filter', false),
- 'escape' => array('twig_escape_filter', true),
-
- // after
- 'even' => new Twig_Filter_Function('twig_is_even_filter'),
- 'escape' => new Twig_Filter_Function('twig_escape_filter', array('needs_environment' => true)),
-
-If you have created NodeTransformer classes, you will need to upgrade them to
-the new interface (please note that the interface is not yet considered
-stable).
-
- * fixed list nodes that did not extend the Twig_NodeListInterface
- * added the "without loop" option to the for tag (it disables the generation of the loop variable)
- * refactored node transformers to node visitors
- * fixed automatic-escaping for blocks
- * added a way to specify variables to pass to an included template
- * changed the automatic-escaping rules to be more sensible and more configurable in custom filters (the documentation lists all the rules)
- * improved the filter system to allow object methods to be used as filters
- * changed the Array and String loaders to actually make use of the cache mechanism
- * included the default filter function definitions in the extension class files directly (Core, Escaper)
- * added the // operator (like the floor() PHP function)
- * added the .. operator (as a syntactic sugar for the range filter when the step is 1)
- * added the in operator (as a syntactic sugar for the in filter)
- * added the following filters in the Core extension: in, range
- * added support for arrays (same behavior as in PHP, a mix between lists and dictionaries, arrays and hashes)
- * enhanced some error messages to provide better feedback in case of parsing errors
-
-* 0.9.4 (2009-12-02)
-
-If you have custom loaders, you MUST upgrade them for this release: The
-Twig_Loader base class has been removed, and the Twig_LoaderInterface has also
-been changed (see the source code for more information or the documentation).
-
- * added support for DateTime instances for the date filter
- * fixed loop.last when the array only has one item
- * made it possible to insert newlines in tag and variable blocks
- * fixed a bug when a literal '\n' were present in a template text
- * fixed bug when the filename of a template contains */
- * refactored loaders
-
-* 0.9.3 (2009-11-11)
-
-This release is NOT backward compatible with the previous releases.
-
- The loaders do not take the cache and autoReload arguments anymore. Instead,
- the Twig_Environment class has two new options: cache and auto_reload.
- Upgrading your code means changing this kind of code:
-
- $loader = new Twig_Loader_Filesystem('/path/to/templates', '/path/to/compilation_cache', true);
- $twig = new Twig_Environment($loader);
-
- to something like this:
-
- $loader = new Twig_Loader_Filesystem('/path/to/templates');
- $twig = new Twig_Environment($loader, array(
- 'cache' => '/path/to/compilation_cache',
- 'auto_reload' => true,
- ));
-
- * deprecated the "items" filter as it is not needed anymore
- * made cache and auto_reload options of Twig_Environment instead of arguments of Twig_Loader
- * optimized template loading speed
- * removed output when an error occurs in a template and render() is used
- * made major speed improvements for loops (up to 300% on even the smallest loops)
- * added properties as part of the sandbox mode
- * added public properties support (obj.item can now be the item property on the obj object)
- * extended set tag to support expression as value ({% set foo as 'foo' ~ 'bar' %} )
- * fixed bug when \ was used in HTML
-
-* 0.9.2 (2009-10-29)
-
- * made some speed optimizations
- * changed the cache extension to .php
- * added a js escaping strategy
- * added support for short block tag
- * changed the filter tag to allow chained filters
- * made lexer more flexible as you can now change the default delimiters
- * added set tag
- * changed default directory permission when cache dir does not exist (more secure)
- * added macro support
- * changed filters first optional argument to be a Twig_Environment instance instead of a Twig_Template instance
- * made Twig_Autoloader::autoload() a static method
- * avoid writing template file if an error occurs
- * added $ escaping when outputting raw strings
- * enhanced some error messages to ease debugging
- * fixed empty cache files when the template contains an error
-
-* 0.9.1 (2009-10-14)
-
- * fixed a bug in PHP 5.2.6
- * fixed numbers with one than one decimal
- * added support for method calls with arguments ({{ foo.bar('a', 43) }})
- * made small speed optimizations
- * made minor tweaks to allow better extensibility and flexibility
-
-* 0.9.0 (2009-10-12)
-
- * Initial release
View
31 vendors/twig-1.8.2/LICENSE
@@ -1,31 +0,0 @@
-Copyright (c) 2009 by the Twig Team, see AUTHORS for more details.
-
-Some rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
- * The names of the contributors may not be used to endorse or
- promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
17 vendors/twig-1.8.2/README.markdown
@@ -1,17 +0,0 @@
-Twig, the flexible, fast, and secure template language for PHP
-==============================================================
-
-[![Build Status](https://secure.travis-ci.org/fabpot/Twig.png?branch=master)](http://travis-ci.org/fabpot/Twig)
-
-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.
-
-More Information
-----------------
-
-Read the [documentation][1] for more information.
-
-[1]: http://twig.sensiolabs.org/documentation
View
42 vendors/twig-1.8.2/bin/create_pear_package.php
@@ -1,42 +0,0 @@
-<?php
-
-if (!isset($argv[1]))
-{
- die('You must provide the version (1.0.0)');
-}
-
-if (!isset($argv[2]))
-{
- die('You must provide the stability (alpha, beta, or stable)');
-}
-
-$context = array(
- 'date' => date('Y-m-d'),
- 'time' => date('H:m:00'),
- 'version' => $argv[1],
- 'api_version' => $argv[1],
- 'stability' => $argv[2],
- 'api_stability' => $argv[2],
-);
-
-$context['files'] = '';
-$path = realpath(dirname(__FILE__).'/../lib/Twig');
-foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY) as $file)
-{
- if (preg_match('/\.php$/', $file))
- {
- $name = str_replace($path.'/', '', $file);
- $context['files'] .= ' <file install-as="Twig/'.$name.'" name="'.$name.'" role="php" />'."\n";
- }
-}
-
-$template = file_get_contents(dirname(__FILE__).'/../package.xml.tpl');
-$content = preg_replace_callback('/\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/', 'replace_parameters', $template);
-file_put_contents(dirname(__FILE__).'/../package.xml', $content);
-
-function replace_parameters($matches)
-{
- global $context;
-
- return isset($context[$matches[1]]) ? $context[$matches[1]] : null;
-}
View
31 vendors/twig-1.8.2/composer.json
@@ -1,31 +0,0 @@
-{
- "name": "twig/twig",
- "type": "library",
- "description": "Twig, the flexible, fast, and secure template language for PHP",
- "keywords": ["templating"],
- "homepage": "http://twig.sensiolabs.org",
- "license": "BSD-3",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Armin Ronacher",
- "email": "armin.ronacher@active-4.com"
- }
- ],
- "require": {
- "php": ">=5.2.4"
- },
- "autoload": {
- "psr-0" : {
- "Twig_" : "lib/"
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.8-dev"
- }
- }
-}
View
819 vendors/twig-1.8.2/doc/advanced.rst
@@ -1,819 +0,0 @@
-Extending Twig
-==============
-
-Twig can be extended in many ways; you can add extra tags, filters, tests,
-operators, global variables, and functions. You can even extend the parser
-itself with node visitors.
-
-.. note::
-
- This chapter describes how to extend Twig easily. If you want to reuse
- your changes in different projects or if you want to share them with
- others, you should then create an extension as described in the next
- chapter.
-
-Before extending Twig, you must understand the differences between all the
-different possible extension points and when to use them.
-
-First, remember that Twig has two main language constructs:
-
-* ``{{ }}``: used to print the result of an expression evaluation;
-
-* ``{% %}``: used to execute statements.
-
-To understand why Twig exposes so many extension points, let's see how to
-implement a *Lorem ipsum* generator (it needs to know the number of words to
-generate).
-
-You can use a ``lipsum`` *tag*:
-
-.. code-block:: jinja
-
- {% lipsum 40 %}
-
-That works, but using a tag for ``lipsum`` is not a good idea for at least
-three main reasons:
-
-* ``lipsum`` is not a language construct;
-* The tag outputs something;
-* The tag is not flexible as you cannot use it in an expression:
-
- .. code-block:: jinja
-
- {{ 'some text' ~ {% lipsum 40 %} ~ 'some more text' }}
-
-In fact, you rarely need to create tags; and that's good news because tags are
-the most complex extension point of Twig.
-
-Now, let's use a ``lipsum`` *filter*:
-
-.. code-block:: jinja
-
- {{ 40|lipsum }}
-
-Again, it works, but it looks weird. A filter transforms the passed value to
-something else but here we use the value to indicate the number of words to
-generate.
-
-Next, let's use a ``lipsum`` *function*:
-
-.. code-block:: jinja
-
- {{ lipsum(40) }}
-
-Here we go. For this specific example, the creation of a function is the
-extension point to use. And you can use it anywhere an expression is accepted:
-
-.. code-block:: jinja
-
- {{ 'some text' ~ ipsum(40) ~ 'some more text' }}
-
- {% set ipsum = ipsum(40) %}
-
-Last but not the least, you can also use a *global* object with a method able
-to generate lorem ipsum text:
-
-.. code-block:: jinja
-
- {{ text.lipsum(40) }}
-
-As a rule of thumb, use functions for frequently used features and global
-objects for everything else.
-
-Keep in mind the following when you want to extend Twig:
-
-========== ========================== ========== =========================
-What? Implementation difficulty? How often? When?
-========== ========================== ========== =========================
-*macro* trivial frequent Content generation
-*global* trivial frequent Helper object
-*function* trivial frequent Content generation
-*filter* trivial frequent Value transformation
-*tag* complex rare DSL language construct
-*test* trivial rare Boolean decision
-*operator* trivial rare Values transformation
-========== ========================== ========== =========================
-
-Globals
--------
-
-A global variable is like any other template variable, except that it's
-available in all templates and macros::
-
- $twig = new Twig_Environment($loader);
- $twig->addGlobal('text', new Text());
-
-You can then use the ``text`` variable anywhere in a template:
-
-.. code-block:: jinja
-
- {{ text.lipsum(40) }}
-
-Filters
--------
-
-A filter is a regular PHP function or an object method that takes the left
-side of the filter (before the pipe ``|``) as first argument and the extra
-arguments passed to the filter (within parentheses ``()``) as extra arguments.
-
-Defining a filter is as easy as associating the filter name with a PHP
-callable. For instance, let's say you have the following code in a template:
-
-.. code-block:: jinja
-
- {{ 'TWIG'|lower }}
-
-When compiling this template to PHP, Twig looks for the PHP callable
-associated with the ``lower`` filter. The ``lower`` filter is a built-in Twig
-filter, and it is simply mapped to the PHP ``strtolower()`` function. After
-compilation, the generated PHP code is roughly equivalent to:
-
-.. code-block:: html+php
-
- <?php echo strtolower('TWIG') ?>
-
-As you can see, the ``'TWIG'`` string is passed as a first argument to the PHP
-function.
-
-A filter can also take extra arguments like in the following example:
-
-.. code-block:: jinja
-
- {{ now|date('d/m/Y') }}
-
-In this case, the extra arguments are passed to the function after the main
-argument, and the compiled code is equivalent to:
-
-.. code-block:: html+php
-
- <?php echo twig_date_format_filter($now, 'd/m/Y') ?>
-
-Let's see how to create a new filter.
-
-In this section, we will create a ``rot13`` filter, which should return the
-`rot13`_ transformation of a string. Here is an example of its usage and the
-expected output:
-
-.. code-block:: jinja
-
- {{ "Twig"|rot13 }}
-
- {# should displays Gjvt #}
-
-Adding a filter is as simple as calling the ``addFilter()`` method on the
-``Twig_Environment`` instance::
-
- $twig = new Twig_Environment($loader);
- $twig->addFilter('rot13', new Twig_Filter_Function('str_rot13'));
-
-The second argument of ``addFilter()`` is an instance of ``Twig_Filter``.
-Here, we use ``Twig_Filter_Function`` as the filter is a PHP function. The
-first argument passed to the ``Twig_Filter_Function`` constructor is the name
-of the PHP function to call, here ``str_rot13``, a native PHP function.
-
-Let's say I now want to be able to add a prefix before the converted string:
-
-.. code-block:: jinja
-
- {{ "Twig"|rot13('prefix_') }}
-
- {# should displays prefix_Gjvt #}
-
-As the PHP ``str_rot13()`` function does not support this requirement, let's
-create a new PHP function::
-
- function project_compute_rot13($string, $prefix = '')
- {
- return $prefix.str_rot13($string);
- }
-
-As you can see, the ``prefix`` argument of the filter is passed as an extra
-argument to the ``project_compute_rot13()`` function.
-
-Adding this filter is as easy as before::
-
- $twig->addFilter('rot13', new Twig_Filter_Function('project_compute_rot13'));
-
-For better encapsulation, a filter can also be defined as a static method of a
-class. The ``Twig_Filter_Function`` class can also be used to register such
-static methods as filters::
-
- $twig->addFilter('rot13', new Twig_Filter_Function('SomeClass::rot13Filter'));
-
-.. tip::
-
- In an extension, you can also define a filter as a static method of the
- extension class.
-
-Environment aware Filters
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The ``Twig_Filter`` classes take options as their last argument. For instance,
-if you want access to the current environment instance in your filter, set the
-``needs_environment`` option to ``true``::
-
- $filter = new Twig_Filter_Function('str_rot13', array('needs_environment' => true));
-
-Twig will then pass the current environment as the first argument to the
-filter call::
-
- function twig_compute_rot13(Twig_Environment $env, $string)
- {
- // get the current charset for instance
- $charset = $env->getCharset();
-
- return str_rot13($string);
- }
-
-Automatic Escaping
-~~~~~~~~~~~~~~~~~~
-
-If automatic escaping is enabled, the output of the filter may be escaped
-before printing. If your filter acts as an escaper (or explicitly outputs html
-or javascript code), you will want the raw output to be printed. In such a
-case, set the ``is_safe`` option::
-
- $filter = new Twig_Filter_Function('nl2br', array('is_safe' => array('html')));
-
-Some filters may have to work on already escaped or safe values. In such a
-case, set the ``pre_escape`` option::
-
- $filter = new Twig_Filter_Function('somefilter', array('pre_escape' => 'html', 'is_safe' => array('html')));
-
-Dynamic Filters
-~~~~~~~~~~~~~~~
-
-.. versionadded:: 1.5
- Dynamic filters support was added in Twig 1.5.
-
-A filter name containing the special ``*`` character is a dynamic filter as
-the ``*`` can be any string::
-
- $twig->addFilter('*_path', new Twig_Filter_Function('twig_path'));
-
- function twig_path($name, $arguments)
- {
- // ...
- }
-
-The following filters will be matched by the above defined dynamic filter:
-
-* ``product_path``
-* ``category_path``
-
-A dynamic filter can define more than one dynamic parts::
-
- $twig->addFilter('*_path_*', new Twig_Filter_Function('twig_path'));
-
- function twig_path($name, $suffix, $arguments)
- {
- // ...
- }
-
-The filter will receive all dynamic part values before the normal filters
-arguments. For instance, a call to ``'foo'|a_path_b()`` will result in the
-following PHP call: ``twig_path('a', 'b', 'foo')``.
-
-Functions
----------
-
-A function is a regular PHP function or an object method that can be called from
-templates.
-
-.. code-block:: jinja
-
- {{ constant("DATE_W3C") }}
-
-When compiling this template to PHP, Twig looks for the PHP callable
-associated with the ``constant`` function. The ``constant`` function is a built-in Twig
-function, and it is simply mapped to the PHP ``constant()`` function. After
-compilation, the generated PHP code is roughly equivalent to:
-
-.. code-block:: html+php
-
- <?php echo constant('DATE_W3C') ?>
-
-Adding a function is similar to adding a filter. This can be done by calling the
-``addFunction()`` method on the ``Twig_Environment`` instance::
-
- $twig = new Twig_Environment($loader);
- $twig->addFunction('functionName', new Twig_Function_Function('someFunction'));
-
-You can also expose extension methods as functions in your templates::
-
- // $this is an object that implements Twig_ExtensionInterface.
- $twig = new Twig_Environment($loader);
- $twig->addFunction('otherFunction', new Twig_Function_Method($this, 'someMethod'));
-
-Functions also support ``needs_environment`` and ``is_safe`` parameters.
-
-Dynamic Functions
-~~~~~~~~~~~~~~~~~
-
-.. versionadded:: 1.5
- Dynamic functions support was added in Twig 1.5.
-
-A function name containing the special ``*`` character is a dynamic function
-as the ``*`` can be any string::
-
- $twig->addFunction('*_path', new Twig_Function_Function('twig_path'));
-
- function twig_path($name, $arguments)
- {
- // ...
- }
-
-The following functions will be matched by the above defined dynamic function:
-
-* ``product_path``
-* ``category_path``
-
-A dynamic function can define more than one dynamic parts::
-
- $twig->addFilter('*_path_*', new Twig_Filter_Function('twig_path'));
-
- function twig_path($name, $suffix, $arguments)
- {
- // ...
- }
-
-The function will receive all dynamic part values before the normal functions
-arguments. For instance, a call to ``a_path_b('foo')`` will result in the
-following PHP call: ``twig_path('a', 'b', 'foo')``.
-
-Tags
-----
-
-One of the most exciting feature of a template engine like Twig is the
-possibility to define new language constructs. This is also the most complex
-feature as you need to understand how Twig's internals work.
-
-Let's create a simple ``set`` tag that allows the definition of simple
-variables from within a template. The tag can be used like follows:
-
-.. code-block:: jinja
-
- {% set name = "value" %}
-
- {{ name }}
-
- {# should output value #}
-
-.. note::
-
- The ``set`` tag is part of the Core extension and as such is always
- available. The built-in version is slightly more powerful and supports
- multiple assignments by default (cf. the template designers chapter for
- more information).
-
-Three steps are needed to define a new tag:
-
-* Defining a Token Parser class (responsible for parsing the template code);
-
-* Defining a Node class (responsible for converting the parsed code to PHP);
-
-* Registering the tag.
-
-Registering a new tag
-~~~~~~~~~~~~~~~~~~~~~
-
-Adding a tag is as simple as calling the ``addTokenParser`` method on the
-``Twig_Environment`` instance::
-
- $twig = new Twig_Environment($loader);
- $twig->addTokenParser(new Project_Set_TokenParser());
-
-Defining a Token Parser
-~~~~~~~~~~~~~~~~~~~~~~~
-
-Now, let's see the actual code of this class::
-
- class Project_Set_TokenParser extends Twig_TokenParser
- {
- public function parse(Twig_Token $token)
- {
- $lineno = $token->getLine();
- $name = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE)->getValue();
- $this->parser->getStream()->expect(Twig_Token::OPERATOR_TYPE, '=');
- $value = $this->parser->getExpressionParser()->parseExpression();
-
- $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
-
- return new Project_Set_Node($name, $value, $lineno, $this->getTag());
- }
-
- public function getTag()
- {
- return 'set';
- }
- }
-
-The ``getTag()`` method must return the tag we want to parse, here ``set``.
-
-The ``parse()`` method is invoked whenever the parser encounters a ``set``
-tag. It should return a ``Twig_Node`` instance that represents the node (the
-``Project_Set_Node`` calls creating is explained in the next section).
-
-The parsing process is simplified thanks to a bunch of methods you can call
-from the token stream (``$this->parser->getStream()``):
-
-* ``getCurrent()``: Gets the current token in the stream.
-
-* ``next()``: Moves to the next token in the stream, *but returns the old one*.
-
-* ``test($type)``, ``test($value)`` or ``test($type, $value)``: Determines whether
- the current token is of a particular type or value (or both). The value may be an
- array of several possible values.
-
-* ``expect($type[, $value[, $message]])``: If the current token isn't of the given
- type/value a syntax error is thrown. Otherwise, if the type and value are correct,
- the token is returned and the stream moves to the next token.
-
-* ``look()``: Looks a the next token without consuming it.
-
-Parsing expressions is done by calling the ``parseExpression()`` like we did for
-the ``set`` tag.
-
-.. tip::
-
- Reading the existing ``TokenParser`` classes is the best way to learn all
- the nitty-gritty details of the parsing process.
-
-Defining a Node
-~~~~~~~~~~~~~~~
-
-The ``Project_Set_Node`` class itself is rather simple::
-
- class Project_Set_Node extends Twig_Node
- {
- public function __construct($name, Twig_Node_Expression $value, $lineno, $tag = null)
- {
- parent::__construct(array('value' => $value), array('name' => $name), $lineno, $tag);
- }
-
- public function compile(Twig_Compiler $compiler)
- {
- $compiler
- ->addDebugInfo($this)
- ->write('$context[\''.$this->getAttribute('name').'\'] = ')
- ->subcompile($this->getNode('value'))
- ->raw(";\n")
- ;
- }
- }
-
-The compiler implements a fluid interface and provides methods that helps the
-developer generate beautiful and readable PHP code:
-
-* ``subcompile()``: Compiles a node.
-
-* ``raw()``: Writes the given string as is.
-
-* ``write()``: Writes the given string by adding indentation at the beginning
- of each line.
-
-* ``string()``: Writes a quoted string.
-
-* ``repr()``: Writes a PHP representation of a given value (see
- ``Twig_Node_For`` for a usage example).
-
-* ``addDebugInfo()``: Adds the line of the original template file related to
- the current node as a comment.
-
-* ``indent()``: Indents the generated code (see ``Twig_Node_Block`` for a
- usage example).
-
-* ``outdent()``: Outdents the generated code (see ``Twig_Node_Block`` for a
- usage example).
-
-.. _creating_extensions:
-
-Creating an Extension
----------------------
-
-The main motivation for writing an extension is to move often used code into a
-reusable class like adding support for internationalization. An extension can
-define tags, filters, tests, operators, global variables, functions, and node
-visitors.
-
-Creating an extension also makes for a better separation of code that is
-executed at compilation time and code needed at runtime. As such, it makes
-your code faster.
-
-Most of the time, it is useful to create a single extension for your project,
-to host all the specific tags and filters you want to add to Twig.
-
-.. note::
-
- Before writing your own extensions, have a look at the Twig official
- extension repository: http://github.com/fabpot/Twig-extensions.
-
-An extension is a class that implements the following interface::
-
- interface Twig_ExtensionInterface
- {
- /**
- * Initializes the runtime environment.
- *
- * This is where you can load some file that contains filter functions for instance.
- *
- * @param Twig_Environment $environment The current Twig_Environment instance
- */
- function initRuntime(Twig_Environment $environment);
-
- /**
- * Returns the token parser instances to add to the existing list.
- *
- * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
- */
- function getTokenParsers();
-
- /**
- * Returns the node visitor instances to add to the existing list.
- *
- * @return array An array of Twig_NodeVisitorInterface instances
- */
- function getNodeVisitors();
-
- /**
- * Returns a list of filters to add to the existing list.
- *
- * @return array An array of filters
- */
- function getFilters();
-
- /**
- * Returns a list of tests to add to the existing list.
- *
- * @return array An array of tests
- */
- function getTests();
-
- /**
- * Returns a list of functions to add to the existing list.
- *
- * @return array An array of functions
- */
- function getFunctions();
-
- /**
- * Returns a list of operators to add to the existing list.
- *
- * @return array An array of operators
- */
- function getOperators();
-
- /**
- * Returns a list of global variables to add to the existing list.
- *
- * @return array An array of global variables
- */
- function getGlobals();
-
- /**
- * Returns the name of the extension.
- *
- * @return string The extension name
- */
- function getName();
- }
-
-To keep your extension class clean and lean, it can inherit from the built-in
-``Twig_Extension`` class instead of implementing the whole interface. That
-way, you just need to implement the ``getName()`` method as the
-``Twig_Extension`` provides empty implementations for all other methods.
-
-The ``getName()`` method must return a unique identifier for your extension.
-
-Now, with this information in mind, let's create the most basic extension
-possible::
-
- class Project_Twig_Extension extends Twig_Extension
- {
- public function getName()
- {
- return 'project';
- }
- }
-
-.. note::
-
- Of course, this extension does nothing for now. We will customize it in
- the next sections.
-
-Twig does not care where you save your extension on the filesystem, as all
-extensions must be registered explicitly to be available in your templates.
-
-You can register an extension by using the ``addExtension()`` method on your
-main ``Environment`` object::
-
- $twig = new Twig_Environment($loader);
- $twig->addExtension(new Project_Twig_Extension());
-
-Of course, you need to first load the extension file by either using
-``require_once()`` or by using an autoloader (see `spl_autoload_register()`_).
-
-.. tip::
-
- The bundled extensions are great examples of how extensions work.
-
-Globals
-~~~~~~~
-
-Global variables can be registered in an extension via the ``getGlobals()``
-method::
-
- class Project_Twig_Extension extends Twig_Extension
- {
- public function getGlobals()
- {
- return array(
- 'text' => new Text(),
- );
- }
-
- // ...
- }
-
-Functions
-~~~~~~~~~
-
-Functions can be registered in an extension via the ``getFunctions()``
-method::
-
- class Project_Twig_Extension extends Twig_Extension
- {
- public function getFunctions()
- {
- return array(
- 'lipsum' => new Twig_Function_Function('generate_lipsum'),
- );
- }
-
- // ...
- }
-
-Filters
-~~~~~~~
-
-To add a filter to an extension, you need to override the ``getFilters()``
-method. This method must return an array of filters to add to the Twig
-environment::
-
- class Project_Twig_Extension extends Twig_Extension
- {
- public function getFilters()
- {
- return array(
- 'rot13' => new Twig_Filter_Function('str_rot13'),
- );
- }
-
- // ...
- }
-
-As you can see in the above code, the ``getFilters()`` method returns an array
-where keys are the name of the filters (``rot13``) and the values the
-definition of the filter (``new Twig_Filter_Function('str_rot13')``).
-
-As seen in the previous chapter, you can also define filters as static methods
-on the extension class::
-
-$twig->addFilter('rot13', new Twig_Filter_Function('Project_Twig_Extension::rot13Filter'));
-
-You can also use ``Twig_Filter_Method`` instead of ``Twig_Filter_Function``
-when defining a filter to use a method::
-
- class Project_Twig_Extension extends Twig_Extension
- {
- public function getFilters()
- {
- return array(
- 'rot13' => new Twig_Filter_Method($this, 'rot13Filter'),
- );
- }
-
- public function rot13Filter($string)
- {
- return str_rot13($string);
- }
-
- // ...
- }
-
-The first argument of the ``Twig_Filter_Method`` constructor is always
-``$this``, the current extension object. The second one is the name of the
-method to call.
-
-Using methods for filters is a great way to package your filter without
-polluting the global namespace. This also gives the developer more flexibility
-at the cost of a small overhead.
-
-Overriding default Filters
-..........................
-
-If some default core filters do not suit your needs, you can easily override
-them by creating your own core extension. Of course, you don't need to copy
-and paste the whole core extension code of Twig. Instead, you can just extends
-it and override the filter(s) you want by overriding the ``getFilters()``
-method::
-
- class MyCoreExtension extends Twig_Extension_Core
- {
- public function getFilters()
- {
- return array_merge(parent::getFilters(), array(
- 'date' => new Twig_Filter_Method($this, 'dateFilter'),
- // ...
- ));
- }
-
- public function dateFilter($timestamp, $format = 'F j, Y H:i')
- {
- return '...'.twig_date_format_filter($timestamp, $format);
- }
-
- // ...
- }
-
-Here, we override the ``date`` filter with a custom one. Using this new core
-extension is as simple as registering the ``MyCoreExtension`` extension by
-calling the ``addExtension()`` method on the environment instance::
-
- $twig = new Twig_Environment($loader);
- $twig->addExtension(new MyCoreExtension());
-
-But I can already hear some people wondering how it can work as the Core
-extension is loaded by default. That's true, but the trick is that both
-extensions share the same unique identifier (``core`` - defined in the
-``getName()`` method). By registering an extension with the same name as an
-existing one, you have actually overridden the default one, even if it is
-already registered::
-
- $twig->addExtension(new Twig_Extension_Core());
- $twig->addExtension(new MyCoreExtension());
-
-Tags
-~~~~
-
-Adding a tag in an extension can be done by overriding the
-``getTokenParsers()`` method. This method must return an array of tags to add
-to the Twig environment::
-
- class Project_Twig_Extension extends Twig_Extension
- {
- public function getTokenParsers()
- {
- return array(new Project_Set_TokenParser());
- }
-
- // ...
- }
-
-In the above code, we have added a single new tag, defined by the
-``Project_Set_TokenParser`` class. The ``Project_Set_TokenParser`` class is
-responsible for parsing the tag and compiling it to PHP.
-
-Operators
-~~~~~~~~~
-
-The ``getOperators()`` methods allows to add new operators. Here is how to add
-``!``, ``||``, and ``&&`` operators::
-
- class Project_Twig_Extension extends Twig_Extension
- {
- public function getOperators()
- {
- return array(
- array(
- '!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),
- ),
- array(
- '||' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
- '&&' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
- ),
- );
- }
-
- // ...
- }
-
-Tests
-~~~~~
-
-The ``getTests()`` methods allows to add new test functions::
-
- class Project_Twig_Extension extends Twig_Extension
- {
- public function getTests()
- {
- return array(
- 'even' => new Twig_Test_Function('twig_test_even'),
- );
- }
-
- // ...
- }
-
-.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
-.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php
View
486 vendors/twig-1.8.2/doc/api.rst
@@ -1,486 +0,0 @@
-Twig for Developers
-===================
-
-This chapter describes the API to Twig and not the template language. It will
-be most useful as reference to those implementing the template interface to
-the application and not those who are creating Twig templates.
-
-Basics
-------
-
-Twig uses a central object called the **environment** (of class
-``Twig_Environment``). Instances of this class are used to store the
-configuration and extensions, and are used to load templates from the file
-system or other locations.
-
-Most applications will create one ``Twig_Environment`` object on application
-initialization and use that to load templates. In some cases it's however
-useful to have multiple environments side by side, if different configurations
-are in use.
-
-The simplest way to configure Twig to load templates for your application
-looks roughly like this::
-
- require_once '/path/to/lib/Twig/Autoloader.php';
- Twig_Autoloader::register();
-
- $loader = new Twig_Loader_Filesystem('/path/to/templates');
- $twig = new Twig_Environment($loader, array(
- 'cache' => '/path/to/compilation_cache',
- ));
-
-This will create a template environment with the default settings and a loader
-that looks up the templates in the ``/path/to/templates/`` folder. Different
-loaders are available and you can also write your own if you want to load
-templates from a database or other resources.
-
-.. note::
-
- Notice that the second argument of the environment is an array of options.
- The ``cache`` option is a compilation cache directory, where Twig caches
- the compiled templates to avoid the parsing phase for sub-sequent
- requests. It is very different from the cache you might want to add for
- the evaluated templates. For such a need, you can use any available PHP
- cache library.
-
-To load a template from this environment you just have to call the
-``loadTemplate()`` method which then returns a ``Twig_Template`` instance::
-
- $template = $twig->loadTemplate('index.html');
-
-To render the template with some variables, call the ``render()`` method::
-
- echo $template->render(array('the' => 'variables', 'go' => 'here'));
-
-.. note::
-
- The ``display()`` method is a shortcut to output the template directly.
-
-You can also load and render the template in one fell swoop::
-
- echo $twig->render('index.html', array('the' => 'variables', 'go' => 'here'));
-
-.. _environment_options:
-
-Environment Options
--------------------
-
-When creating a new ``Twig_Environment`` instance, you can pass an array of
-options as the constructor second argument::
-
- $twig = new Twig_Environment($loader, array('debug' => true));
-
-The following options are available:
-
-* ``debug``: When set to ``true``, the generated templates have a
- ``__toString()`` method that you can use to display the generated nodes
- (default to ``false``).
-
-* ``charset``: The charset used by the templates (default to ``utf-8``).
-
-* ``base_template_class``: The base template class to use for generated
- templates (default to ``Twig_Template``).
-
-* ``cache``: An absolute path where to store the compiled templates, or
- ``false`` to disable caching (which is the default).
-
-* ``auto_reload``: When developing with Twig, it's useful to recompile the
- template whenever the source code changes. If you don't provide a value for
- the ``auto_reload`` option, it will be determined automatically based on the
- ``debug`` value.
-
-* ``strict_variables``: If set to ``false``, Twig will silently ignore invalid
- variables (variables and or attributes/methods that do not exist) and
- replace them with a ``null`` value. When set to ``true``, Twig throws an
- exception instead (default to ``false``).
-
-* ``autoescape``: If set to ``true``, auto-escaping will be enabled by default
- for all templates (default to ``true``). As of Twig 1.8, you can set the
- escaping strategy to use (``html``, ``js``, ``false`` to disable, or a PHP
- callback that takes the template "filename" and must return the escaping
- strategy to use).
-
-* ``optimizations``: A flag that indicates which optimizations to apply
- (default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
- disable).
-
-Loaders
--------
-
-Loaders are responsible for loading templates from a resource such as the file
-system.
-
-Compilation Cache
-~~~~~~~~~~~~~~~~~
-
-All template loaders can cache the compiled templates on the filesystem for
-future reuse. It speeds up Twig a lot as templates are only compiled once; and
-the performance boost is even larger if you use a PHP accelerator such as APC.
-See the ``cache`` and ``auto_reload`` options of ``Twig_Environment`` above
-for more information.
-
-Built-in Loaders
-~~~~~~~~~~~~~~~~
-
-Here is a list of the built-in loaders Twig provides:
-
-* ``Twig_Loader_Filesystem``: Loads templates from the file system. This
- loader can find templates in folders on the file system and is the preferred
- way to load them::
-
- $loader = new Twig_Loader_Filesystem($templateDir);
-
- It can also look for templates in an array of directories::
-
- $loader = new Twig_Loader_Filesystem(array($templateDir1, $templateDir2));
-
- With such a configuration, Twig will first look for templates in
- ``$templateDir1`` and if they do not exist, it will fallback to look for
- them in the ``$templateDir2``.
-
-* ``Twig_Loader_String``: Loads templates from a string. It's a dummy loader
- as you pass it the source code directly::
-
- $loader = new Twig_Loader_String();
-
-* ``Twig_Loader_Array``: Loads a template from a PHP array. It's passed an
- array of strings bound to template names. This loader is useful for unit
- testing::
-
- $loader = new Twig_Loader_Array($templates);
-
-.. tip::
-
- When using the ``Array`` or ``String`` loaders with a cache mechanism, you
- should know that a new cache key is generated each time a template content
- "changes" (the cache key being the source code of the template). If you
- don't want to see your cache grows out of control, you need to take care
- of clearing the old cache file by yourself.
-
-Create your own Loader
-~~~~~~~~~~~~~~~~~~~~~~
-
-All loaders implement the ``Twig_LoaderInterface``::
-
- interface Twig_LoaderInterface
- {
- /**
- * Gets the source code of a template, given its name.
- *
- * @param string $name string The name of the template to load
- *
- * @return string The template source code
- */
- function getSource($name);
-
- /**
- * Gets the cache key to use for the cache for a given template name.
- *
- * @param string $name string The name of the template to load
- *
- * @return string The cache key
- */
- function getCacheKey($name);
-
- /**
- * Returns true if the template is still fresh.
- *
- * @param string $name The template name
- * @param timestamp $time The last modification time of the cached template
- */
- function isFresh($name, $time);
- }
-
-As an example, here is how the built-in ``Twig_Loader_String`` reads::
-
- class Twig_Loader_String implements Twig_LoaderInterface
- {
- public function getSource($name)
- {
- return $name;
- }
-
- public function getCacheKey($name)
- {
- return $name;
- }
-
- public function isFresh($name, $time)
- {
- return false;
- }
- }
-
-The ``isFresh()`` method must return ``true`` if the current cached template
-is still fresh, given the last modification time, or ``false`` otherwise.
-
-Using Extensions
-----------------
-
-Twig extensions are packages that add new features to Twig. Using an
-extension is as simple as using the ``addExtension()`` method::
-
- $twig->addExtension(new Twig_Extension_Sandbox());
-
-Twig comes bundled with the following extensions:
-
-* *Twig_Extension_Core*: Defines all the core features of Twig.
-
-* *Twig_Extension_Escaper*: Adds automatic output-escaping and the possibility
- to escape/unescape blocks of code.
-
-* *Twig_Extension_Sandbox*: Adds a sandbox mode to the default Twig
- environment, making it safe to evaluated untrusted code.
-
-* *Twig_Extension_Optimizer*: Optimizers the node tree before compilation.
-
-The core, escaper, and optimizer extensions do not need to be added to the
-Twig environment, as they are registered by default. You can disable an
-already registered extension::
-
- $twig->removeExtension('escaper');
-
-Built-in Extensions
--------------------
-
-This section describes the features added by the built-in extensions.
-
-.. tip::
-
- Read the chapter about extending Twig to learn how to create your own
- extensions.
-
-Core Extension
-~~~~~~~~~~~~~~
-
-The ``core`` extension defines all the core features of Twig:
-
-* Tags:
-
- * ``for``
- * ``if``
- * ``extends``
- * ``include``
- * ``block``
- * ``filter``
- * ``macro``
- * ``import``
- * ``from``
- * ``set``
- * ``spaceless``
-
-* Filters:
-
- * ``date``
- * ``format``
- * ``replace``
- * ``url_encode``
- * ``json_encode``
- * ``title``
- * ``capitalize``
- * ``upper``
- * ``lower``
- * ``striptags``
- * ``join``
- * ``reverse``
- * ``length``
- * ``sort``
- * ``merge``
- * ``default``
- * ``keys``
- * ``escape``
- * ``e``
-
-* Functions:
-
- * ``range``
- * ``constant``
- * ``cycle``
- * ``parent``
- * ``block``
-
-* Tests:
-
- * ``even``
- * ``odd``
- * ``defined``
- * ``sameas``
- * ``null``
- * ``divisibleby``
- * ``constant``
- * ``empty``
-
-Escaper Extension
-~~~~~~~~~~~~~~~~~
-
-The ``escaper`` extension adds automatic output escaping to Twig. It defines a
-tag, ``autoescape``, and a filter, ``raw``.
-
-When creating the escaper extension, you can switch on or off the global
-output escaping strategy::
-
- $escaper = new Twig_Extension_Escaper(true);
- $twig->addExtension($escaper);
-
-If set to ``true``, all variables in templates are escaped (using the ``html``
-escaping strategy), except those using the ``raw`` filter:
-
-.. code-block:: jinja
-
- {{ article.to_html|raw }}
-
-You can also change the escaping mode locally by using the ``autoescape`` tag
-(see the :doc:`autoescape<tags/autoescape>` doc for the syntax used before
-Twig 1.8):
-
-.. code-block:: jinja
-
- {% autoescape 'html' %}
- {{ var }}
- {{ var|raw }} {# var won't be escaped #}
- {{ var|escape }} {# var won't be double-escaped #}
- {% endautoescape %}
-
-.. warning::
-
- The ``autoescape`` tag has no effect on included files.
-
-The escaping rules are implemented as follows:
-
-* Literals (integers, booleans, arrays, ...) used in the template directly as
- variables or filter arguments are never automatically escaped:
-
- .. code-block:: jinja
-
- {{ "Twig<br />" }} {# won't be escaped #}
-
- {% set text = "Twig<br />" %}
- {{ text }} {# will be escaped #}
-
-* Expressions which the result is always a literal or a variable marked safe
- are never automatically escaped:
-
- .. code-block:: jinja
-
- {{ foo ? "Twig<br />" : "<br />Twig" }} {# won't be escaped #}
-
- {% set text = "Twig<br />" %}
- {{ foo ? text : "<br />Twig" }} {# will be escaped #}
-
- {% set text = "Twig<br />" %}
- {{ foo ? text|raw : "<br />Twig" }} {# won't be escaped #}
-
- {% set text = "Twig<br />" %}
- {{ foo ? text|escape : "<br />Twig" }} {# the result of the expression won't be escaped #}
-
-* Escaping is applied before printing, after any other filter is applied:
-
- .. code-block:: jinja
-
- {{ var|upper }} {# is equivalent to {{ var|upper|escape }} #}
-
-* The `raw` filter should only be used at the end of the filter chain:
-
- .. code-block:: jinja
-
- {{ var|raw|upper }} {# will be escaped #}
-
- {{ var|upper|raw }} {# won't be escaped #}
-
-* Automatic escaping is not applied if the last filter in the chain is marked
- safe for the current context (e.g. ``html`` or ``js``). ``escaper`` and
- ``escaper('html')`` are marked safe for html, ``escaper('js')`` is marked
- safe for javascript, ``raw`` is marked safe for everything.
-
- .. code-block:: jinja
-
- {% autoescape true js %}
- {{ var|escape('html') }} {# will be escaped for html and javascript #}
- {{ var }} {# will be escaped for javascript #}
- {{ var|escape('js') }} {# won't be double-escaped #}
- {% endautoescape %}
-
-.. note::
-
- Note that autoescaping has some limitations as escaping is applied on
- expressions after evaluation. For instance, when working with
- concatenation, ``{{ foo|raw ~ bar }}`` won't give the expected result as
- escaping is applied on the result of the concatenation, not on the
- individual variables (so, the ``raw`` filter won't have any effect here).
-
-Sandbox Extension
-~~~~~~~~~~~~~~~~~
-
-The ``sandbox`` extension can be used to evaluate untrusted code. Access to
-unsafe attributes and methods is prohibited. The sandbox security is managed
-by a policy instance. By default, Twig comes with one policy class:
-``Twig_Sandbox_SecurityPolicy``. This class allows you to white-list some
-tags, filters, properties, and methods::
-
- $tags = array('if');
- $filters = array('upper');
- $methods = array(
- 'Article' => array('getTitle', 'getBody'),
- );
- $properties = array(
- 'Article' => array('title', 'body'),
- );
- $functions = array('range');
- $policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties, $functions);
-
-With the previous configuration, the security policy will only allow usage of
-the ``if`` tag, and the ``upper`` filter. Moreover, the templates will only be
-able to call the ``getTitle()`` and ``getBody()`` methods on ``Article``
-objects, and the ``title`` and ``body`` public properties. Everything else
-won't be allowed and will generate a ``Twig_Sandbox_SecurityError`` exception.
-
-The policy object is the first argument of the sandbox constructor::
-
- $sandbox = new Twig_Extension_Sandbox($policy);
- $twig->addExtension($sandbox);
-
-By default, the sandbox mode is disabled and should be enabled when including
-untrusted template code by using the ``sandbox`` tag:
-
-.. code-block:: jinja
-
- {% sandbox %}
- {% include 'user.html' %}
- {% endsandbox %}
-
-You can sandbox all templates by passing ``true`` as the second argument of
-the extension constructor::
-
- $sandbox = new Twig_Extension_Sandbox($policy, true);
-
-Optimizer Extension
-~~~~~~~~~~~~~~~~~~~
-
-The ``optimizer`` extension optimizes the node tree before compilation::
-
- $twig->addExtension(new Twig_Extension_Optimizer());
-
-By default, all optimizations are turned on. You can select the ones you want
-to enable by passing them to the constructor::
-
- $optimizer = new Twig_Extension_Optimizer(Twig_NodeVisitor_Optimizer::OPTIMIZE_FOR);
-
- $twig->addExtension($optimizer);
-
-Exceptions
-----------
-
-Twig can throw exceptions:
-
-* ``Twig_Error``: The base exception for all errors.
-
-* ``Twig_Error_Syntax``: Thrown to tell the user that there is a problem with
- the template syntax.
-
-* ``Twig_Error_Runtime``: Thrown when an error occurs at runtime (when a filter
- does not exist for instance).
-
-* ``Twig_Error_Loader``: Thrown when an error occurs during template loading.
-
-* ``Twig_Sandbox_SecurityError``: Thrown when an unallowed tag, filter, or
- method is called in a sandboxed template.
View
101 vendors/twig-1.8.2/doc/coding_standards.rst
@@ -1,101 +0,0 @@
-Coding Standards
-================
-
-When writing Twig templates, we recommend you to follow these official coding
-standards:
-
-* Put one (and only one) space after the start of a delimiter (``{{``, ``{%``,
- and ``{#``) and before the end of a delimiter (``}}``, ``%}``, and ``#}``):
-