Permalink
Browse files

Add current files to the repository

  • Loading branch information...
1 parent 6717dd3 commit 69ca72074ec2599f8c46d99d639857238bce2a20 @edmundask committed Mar 2, 2012
Showing with 12,838 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +12 −0 config/autoload.php
  3. +207 −0 config/twiggy.php
  4. +4 −0 helpers/twiggy_helper.php
  5. +261 −0 libraries/Twiggy.php
  6. +5 −0 spark.info
  7. +9 −0 vendor/Twig/AUTHORS
  8. +455 −0 vendor/Twig/CHANGELOG
  9. +31 −0 vendor/Twig/LICENSE
  10. +15 −0 vendor/Twig/README.markdown
  11. +46 −0 vendor/Twig/lib/Twig/Autoloader.php
  12. +219 −0 vendor/Twig/lib/Twig/Compiler.php
  13. +35 −0 vendor/Twig/lib/Twig/CompilerInterface.php
  14. +1,060 −0 vendor/Twig/lib/Twig/Environment.php
  15. +195 −0 vendor/Twig/lib/Twig/Error.php
  16. +20 −0 vendor/Twig/lib/Twig/Error/Loader.php
  17. +21 −0 vendor/Twig/lib/Twig/Error/Runtime.php
  18. +21 −0 vendor/Twig/lib/Twig/Error/Syntax.php
  19. +488 −0 vendor/Twig/lib/Twig/ExpressionParser.php
  20. +93 −0 vendor/Twig/lib/Twig/Extension.php
  21. +1,004 −0 vendor/Twig/lib/Twig/Extension/Core.php
  22. +64 −0 vendor/Twig/lib/Twig/Extension/Debug.php
  23. +77 −0 vendor/Twig/lib/Twig/Extension/Escaper.php
  24. +35 −0 vendor/Twig/lib/Twig/Extension/Optimizer.php
  25. +112 −0 vendor/Twig/lib/Twig/Extension/Sandbox.php
  26. +84 −0 vendor/Twig/lib/Twig/ExtensionInterface.php
  27. +69 −0 vendor/Twig/lib/Twig/Filter.php
  28. +33 −0 vendor/Twig/lib/Twig/Filter/Function.php
  29. +34 −0 vendor/Twig/lib/Twig/Filter/Method.php
  30. +37 −0 vendor/Twig/lib/Twig/Filter/Node.php
  31. +38 −0 vendor/Twig/lib/Twig/FilterInterface.php
  32. +63 −0 vendor/Twig/lib/Twig/Function.php
  33. +34 −0 vendor/Twig/lib/Twig/Function/Function.php
  34. +35 −0 vendor/Twig/lib/Twig/Function/Method.php
  35. +37 −0 vendor/Twig/lib/Twig/Function/Node.php
  36. +37 −0 vendor/Twig/lib/Twig/FunctionInterface.php
  37. +406 −0 vendor/Twig/lib/Twig/Lexer.php
  38. +29 −0 vendor/Twig/lib/Twig/LexerInterface.php
  39. +102 −0 vendor/Twig/lib/Twig/Loader/Array.php
  40. +100 −0 vendor/Twig/lib/Twig/Loader/Chain.php
  41. +152 −0 vendor/Twig/lib/Twig/Loader/Filesystem.php
  42. +59 −0 vendor/Twig/lib/Twig/Loader/String.php
  43. +45 −0 vendor/Twig/lib/Twig/LoaderInterface.php
  44. +38 −0 vendor/Twig/lib/Twig/Markup.php
  45. +227 −0 vendor/Twig/lib/Twig/Node.php
  46. +40 −0 vendor/Twig/lib/Twig/Node/AutoEscape.php
  47. +45 −0 vendor/Twig/lib/Twig/Node/Block.php
  48. +38 −0 vendor/Twig/lib/Twig/Node/BlockReference.php
  49. +20 −0 vendor/Twig/lib/Twig/Node/Body.php
  50. +39 −0 vendor/Twig/lib/Twig/Node/Do.php
  51. +21 −0 vendor/Twig/lib/Twig/Node/Expression.php
  52. +86 −0 vendor/Twig/lib/Twig/Node/Expression/Array.php
  53. +28 −0 vendor/Twig/lib/Twig/Node/Expression/AssignName.php
  54. +40 −0 vendor/Twig/lib/Twig/Node/Expression/Binary.php
  55. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Add.php
  56. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/And.php
  57. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php
  58. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php
  59. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php
  60. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Concat.php
  61. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Div.php
  62. +17 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Equal.php
  63. +29 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/FloorDiv.php
  64. +17 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Greater.php
  65. +17 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php
  66. +33 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/In.php
  67. +17 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Less.php
  68. +17 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/LessEqual.php
  69. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Mod.php
  70. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Mul.php
  71. +17 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/NotEqual.php
  72. +33 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/NotIn.php
  73. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Or.php
  74. +33 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Power.php
  75. +33 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Range.php
  76. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Binary/Sub.php
  77. +52 −0 vendor/Twig/lib/Twig/Node/Expression/BlockReference.php
  78. +31 −0 vendor/Twig/lib/Twig/Node/Expression/Conditional.php
  79. +23 −0 vendor/Twig/lib/Twig/Node/Expression/Constant.php
  80. +34 −0 vendor/Twig/lib/Twig/Node/Expression/ExtensionReference.php
  81. +61 −0 vendor/Twig/lib/Twig/Node/Expression/Filter.php
  82. +44 −0 vendor/Twig/lib/Twig/Node/Expression/Filter/Default.php
  83. +66 −0 vendor/Twig/lib/Twig/Node/Expression/Function.php
  84. +53 −0 vendor/Twig/lib/Twig/Node/Expression/GetAttr.php
  85. +37 −0 vendor/Twig/lib/Twig/Node/Expression/MethodCall.php
  86. +76 −0 vendor/Twig/lib/Twig/Node/Expression/Name.php
  87. +48 −0 vendor/Twig/lib/Twig/Node/Expression/Parent.php
  88. +22 −0 vendor/Twig/lib/Twig/Node/Expression/TempName.php
  89. +54 −0 vendor/Twig/lib/Twig/Node/Expression/Test.php
  90. +36 −0 vendor/Twig/lib/Twig/Node/Expression/Test/Constant.php
  91. +55 −0 vendor/Twig/lib/Twig/Node/Expression/Test/Defined.php
  92. +34 −0 vendor/Twig/lib/Twig/Node/Expression/Test/Divisibleby.php
  93. +33 −0 vendor/Twig/lib/Twig/Node/Expression/Test/Even.php
  94. +32 −0 vendor/Twig/lib/Twig/Node/Expression/Test/Null.php
  95. +33 −0 vendor/Twig/lib/Twig/Node/Expression/Test/Odd.php
  96. +30 −0 vendor/Twig/lib/Twig/Node/Expression/Test/Sameas.php
  97. +30 −0 vendor/Twig/lib/Twig/Node/Expression/Unary.php
  98. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Unary/Neg.php
  99. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Unary/Not.php
  100. +18 −0 vendor/Twig/lib/Twig/Node/Expression/Unary/Pos.php
  101. +37 −0 vendor/Twig/lib/Twig/Node/Flush.php
  102. +113 −0 vendor/Twig/lib/Twig/Node/For.php
  103. +56 −0 vendor/Twig/lib/Twig/Node/ForLoop.php
  104. +67 −0 vendor/Twig/lib/Twig/Node/If.php
  105. +51 −0 vendor/Twig/lib/Twig/Node/Import.php
  106. +88 −0 vendor/Twig/lib/Twig/Node/Include.php
  107. +84 −0 vendor/Twig/lib/Twig/Node/Macro.php
  108. +323 −0 vendor/Twig/lib/Twig/Node/Module.php
  109. +40 −0 vendor/Twig/lib/Twig/Node/Print.php
  110. +48 −0 vendor/Twig/lib/Twig/Node/Sandbox.php
  111. +71 −0 vendor/Twig/lib/Twig/Node/SandboxedModule.php
  112. +60 −0 vendor/Twig/lib/Twig/Node/SandboxedPrint.php
  113. +102 −0 vendor/Twig/lib/Twig/Node/Set.php
  114. +35 −0 vendor/Twig/lib/Twig/Node/SetTemp.php
  115. +41 −0 vendor/Twig/lib/Twig/Node/Spaceless.php
  116. +40 −0 vendor/Twig/lib/Twig/Node/Text.php
  117. +30 −0 vendor/Twig/lib/Twig/NodeInterface.php
  118. +20 −0 vendor/Twig/lib/Twig/NodeOutputInterface.php
  119. +89 −0 vendor/Twig/lib/Twig/NodeTraverser.php
  120. +162 −0 vendor/Twig/lib/Twig/NodeVisitor/Escaper.php
  121. +247 −0 vendor/Twig/lib/Twig/NodeVisitor/Optimizer.php
  122. +115 −0 vendor/Twig/lib/Twig/NodeVisitor/SafeAnalysis.php
  123. +93 −0 vendor/Twig/lib/Twig/NodeVisitor/Sandbox.php
  124. +48 −0 vendor/Twig/lib/Twig/NodeVisitorInterface.php
  125. +370 −0 vendor/Twig/lib/Twig/Parser.php
  126. +28 −0 vendor/Twig/lib/Twig/ParserInterface.php
  127. +20 −0 vendor/Twig/lib/Twig/Sandbox/SecurityError.php
  128. +120 −0 vendor/Twig/lib/Twig/Sandbox/SecurityPolicy.php
  129. +25 −0 vendor/Twig/lib/Twig/Sandbox/SecurityPolicyInterface.php
  130. +457 −0 vendor/Twig/lib/Twig/Template.php
  131. +47 −0 vendor/Twig/lib/Twig/TemplateInterface.php
  132. +31 −0 vendor/Twig/lib/Twig/Test/Function.php
  133. +32 −0 vendor/Twig/lib/Twig/Test/Method.php
  134. +35 −0 vendor/Twig/lib/Twig/Test/Node.php
  135. +26 −0 vendor/Twig/lib/Twig/TestInterface.php
  136. +219 −0 vendor/Twig/lib/Twig/Token.php
  137. +34 −0 vendor/Twig/lib/Twig/TokenParser.php
  138. +77 −0 vendor/Twig/lib/Twig/TokenParser/AutoEscape.php
  139. +83 −0 vendor/Twig/lib/Twig/TokenParser/Block.php
  140. +42 −0 vendor/Twig/lib/Twig/TokenParser/Do.php
  141. +54 −0 vendor/Twig/lib/Twig/TokenParser/Extends.php
  142. +61 −0 vendor/Twig/lib/Twig/TokenParser/Filter.php
  143. +42 −0 vendor/Twig/lib/Twig/TokenParser/Flush.php
  144. +89 −0 vendor/Twig/lib/Twig/TokenParser/For.php
  145. +74 −0 vendor/Twig/lib/Twig/TokenParser/From.php
  146. +93 −0 vendor/Twig/lib/Twig/TokenParser/If.php
  147. +47 −0 vendor/Twig/lib/Twig/TokenParser/Import.php
  148. +71 −0 vendor/Twig/lib/Twig/TokenParser/Include.php
  149. +69 −0 vendor/Twig/lib/Twig/TokenParser/Macro.php
  150. +55 −0 vendor/Twig/lib/Twig/TokenParser/Sandbox.php
  151. +84 −0 vendor/Twig/lib/Twig/TokenParser/Set.php
  152. +59 −0 vendor/Twig/lib/Twig/TokenParser/Spaceless.php
  153. +85 −0 vendor/Twig/lib/Twig/TokenParser/Use.php
  154. +113 −0 vendor/Twig/lib/Twig/TokenParserBroker.php
  155. +45 −0 vendor/Twig/lib/Twig/TokenParserBrokerInterface.php
  156. +42 −0 vendor/Twig/lib/Twig/TokenParserInterface.php
  157. +140 −0 vendor/Twig/lib/Twig/TokenStream.php
View
@@ -0,0 +1,5 @@
+*.log
+.DS_Store
+*.tmproj
+*.sublime-project
+*.sublime-workspace
View
@@ -0,0 +1,12 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+
+/**
+ * Twiggy - Twig template engine implementation for CodeIgniter
+ *
+ * @author Edmundas Kondrašovas <as@edmundask.lt>
+ * @license http://www.opensource.org/licenses/MIT
+ */
+
+$autoload['libraries'] = array('twiggy');
+$autoload['config'] = array('twiggy');
+$autoload['helper'] = array();
View
@@ -0,0 +1,207 @@
+<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
+
+/**
+ * Twiggy - Twig template engine implementation for CodeIgniter
+ *
+ * Twiggy is not just a simple implementation of Twig template engine
+ * for CodeIgniter. It supports themes, layouts, templates for regular
+ * apps and also for apps that use HMVC (module support).
+ *
+ * @package CodeIgniter
+ * @subpackage Twiggy
+ * @category Config
+ * @author Edmundas Kondrašovas <as@edmundask.lt>
+ * @license http://www.opensource.org/licenses/MIT
+ * @version 0.7.0
+ * @copyright Copyright (c) 2012 Edmundas Kondrašovas <as@edmundask.lt>
+ */
+
+/*
+|--------------------------------------------------------------------------
+| Template file extension
+|--------------------------------------------------------------------------
+|
+| This lets you define the extension for template files. It doesn't affect
+| how Twiggy deals with templates but this may help you if you want to
+| distinguish different kinds of templates. For example, for CodeIgniter
+| you may use *.html.twig template files and *.html.jst for js templates.
+|
+*/
+
+$config['twiggy']['template_file_ext'] = '.html.twig';
+
+
+/*
+|--------------------------------------------------------------------------
+| Syntax Delimiters
+|--------------------------------------------------------------------------
+|
+| If you don't like the default Twig syntax delimiters or if they collide
+| with other languages (for example, you use handlebars.js in your
+| templates), here you can change them.
+|
+| Ruby erb style:
+|
+| 'tag_comment' => array('<%#', '#%>'),
+| 'tag_block' => array('<%', '%>'),
+| 'tag_variable' => array('<%=', '%>')
+|
+| Smarty style:
+|
+| 'tag_comment' => array('{*', '*}'),
+| 'tag_block' => array('{', '}'),
+| 'tag_variable' => array('{$', '}'),
+|
+*/
+
+$config['twiggy']['delimiters'] = array
+(
+ 'tag_comment' => array('{#', '#}'),
+ 'tag_block' => array('{%', '%}'),
+ 'tag_variable' => array('{{', '}}')
+);
+
+
+/*
+|--------------------------------------------------------------------------
+| Environment Options
+|--------------------------------------------------------------------------
+|
+| These are all twig-specific options that you can set. To learn more about
+| each option, check the official documentation.
+|
+*/
+
+$config['twiggy']['environment']['cache'] = FALSE;
+$config['twiggy']['environment']['debug'] = FALSE;
+$config['twiggy']['environment']['charset'] = 'utf-8';
+$config['twiggy']['environment']['base_template_class'] = 'Twig_Template';
+$config['twiggy']['environment']['auto_reload'] = NULL;
+$config['twiggy']['environment']['strict_variables'] = FALSE;
+$config['twiggy']['environment']['autoescape'] = TRUE;
+$config['twiggy']['environment']['optimizations'] = -1;
+
+
+/*
+|--------------------------------------------------------------------------
+| Twig Cache Dir
+|--------------------------------------------------------------------------
+|
+| Path to the cache folder for compiled twig templates. It is relative to
+| CodeIgniter's base directory.
+|
+*/
+
+$config['twiggy']['twig_cache_dir'] = 'cache/twig/';
+
+/*
+|--------------------------------------------------------------------------
+| Themes Base Dir
+|--------------------------------------------------------------------------
+|
+| Directory where themes are located at. This path is relative to
+| CodeIgniter's base directory OR module's base directory. For example:
+|
+| $config['themes_base_dir'] = 'themes/';
+|
+| It will actually mean that themes should be placed at:
+|
+| {APPPATH}/themes/ and {APPPATH}/modules/{some_module}/themes/.
+|
+| NOTE: modules do not necessarily need to be in {APPPATH}/modules/ as
+| Twiggy will figure out the paths by itself. That way you can package
+| your modules with themes.
+|
+| Also, do not forget the trailing slash!
+|
+*/
+
+$config['twiggy']['themes_base_dir'] = 'themes/';
+
+
+/*
+|--------------------------------------------------------------------------
+| Include APPPATH
+|--------------------------------------------------------------------------
+|
+| This lets you include the APPPATH for the themes base directory (only for
+| the application itself, not the modules). See the example below.
+|
+| Suppose you have:
+| $config['themes_base_dir'] = 'themes/'
+| $config['include_apppath'] = TRUE
+|
+| Then the path will be {APPPATH}/themes/ but if you set this option to
+| FALSE, then you will have themes/.
+|
+| This is useful for when you want to have the themes folder outside the
+| application (APPPATH) folder.
+|
+*/
+
+$config['twiggy']['include_apppath'] = TRUE;
+
+
+/*
+|--------------------------------------------------------------------------
+| Default theme
+|--------------------------------------------------------------------------
+*/
+
+$config['twiggy']['default_theme'] = 'default';
+
+
+/*
+|--------------------------------------------------------------------------
+| Default layout
+|--------------------------------------------------------------------------
+*/
+
+$config['twiggy']['default_layout'] = 'index';
+
+
+/*
+|--------------------------------------------------------------------------
+| Default template
+|--------------------------------------------------------------------------
+*/
+
+$config['twiggy']['default_template'] = 'index';
+
+
+/*
+|--------------------------------------------------------------------------
+| Auto-reigster functions
+|--------------------------------------------------------------------------
+|
+| Here you can list all the functions that you want Twiggy to automatically
+| register them for you.
+|
+| NOTE: only registered functions can be used in Twig templates.
+|
+*/
+
+$config['twiggy']['register_functions'] = array
+(
+
+);
+
+
+/*
+|--------------------------------------------------------------------------
+| Auto-reigster filters
+|--------------------------------------------------------------------------
+|
+| Much like with functions, list filters that you want Twiggy to
+| automatically register them for you.
+|
+| NOTE: only registered filters can be used in Twig templates. Also, keep
+| in mind that a filter is nothing more than just a regular function that
+| acceps a string (value) as a parameter and outputs a modified/new string.
+|
+*/
+
+$config['twiggy']['register_filters'] = array
+(
+
+);
@@ -0,0 +1,4 @@
+<?php
+
+
+/* End of file twiggy_helper.php */
Oops, something went wrong.

0 comments on commit 69ca720

Please sign in to comment.