12 |
13 | {% block body %}{% endblock %}
14 |
15 | .. seealso:: :doc:`extends<../tags/extends>`, :doc:`parent<../functions/parent>`
16 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/constant.rst:
--------------------------------------------------------------------------------
1 | ``constant``
2 | ============
3 |
4 | .. versionadded: 1.12.1
5 | constant now accepts object instances as the second argument.
6 |
7 | ``constant`` returns the constant value for a given string:
8 |
9 | .. code-block:: jinja
10 |
11 | {{ some_date|date(constant('DATE_W3C')) }}
12 | {{ constant('Namespace\\Classname::CONSTANT_NAME') }}
13 |
14 | As of 1.12.1 you can read constants from object instances as well:
15 |
16 | .. code-block:: jinja
17 |
18 | {{ constant('RSS', date) }}
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/cycle.rst:
--------------------------------------------------------------------------------
1 | ``cycle``
2 | =========
3 |
4 | The ``cycle`` function cycles on an array of values:
5 |
6 | .. code-block:: jinja
7 |
8 | {% set start_year = date() | date('Y') %}
9 | {% set end_year = start_year + 5 %}
10 |
11 | {% for year in start_year..end_year %}
12 | {{ cycle(['odd', 'even'], loop.index0) }}
13 | {% endfor %}
14 |
15 | The array can contain any number of values:
16 |
17 | .. code-block:: jinja
18 |
19 | {% set fruits = ['apple', 'orange', 'citrus'] %}
20 |
21 | {% for i in 0..10 %}
22 | {{ cycle(fruits, i) }}
23 | {% endfor %}
24 |
25 | Arguments
26 | ---------
27 |
28 | * ``position``: The cycle position
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/index.rst:
--------------------------------------------------------------------------------
1 | Functions
2 | =========
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | attribute
8 | block
9 | constant
10 | cycle
11 | date
12 | dump
13 | include
14 | max
15 | min
16 | parent
17 | random
18 | range
19 | source
20 | template_from_string
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/max.rst:
--------------------------------------------------------------------------------
1 | ``max``
2 | =======
3 |
4 | .. versionadded:: 1.15
5 | The ``max`` function was added in Twig 1.15.
6 |
7 | ``max`` returns the biggest value of a sequence or a set of values:
8 |
9 | .. code-block:: jinja
10 |
11 | {{ max(1, 3, 2) }}
12 | {{ max([1, 3, 2]) }}
13 |
14 | When called with a mapping, max ignores keys and only compares values:
15 |
16 | .. code-block:: jinja
17 |
18 | {{ max({2: "e", 1: "a", 3: "b", 5: "d", 4: "c"}) }}
19 | {# returns "e" #}
20 |
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/min.rst:
--------------------------------------------------------------------------------
1 | ``min``
2 | =======
3 |
4 | .. versionadded:: 1.15
5 | The ``min`` function was added in Twig 1.15.
6 |
7 | ``min`` returns the lowest value of a sequence or a set of values:
8 |
9 | .. code-block:: jinja
10 |
11 | {{ min(1, 3, 2) }}
12 | {{ min([1, 3, 2]) }}
13 |
14 | When called with a mapping, min ignores keys and only compares values:
15 |
16 | .. code-block:: jinja
17 |
18 | {{ min({2: "e", 3: "a", 1: "b", 5: "d", 4: "c"}) }}
19 | {# returns "a" #}
20 |
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/parent.rst:
--------------------------------------------------------------------------------
1 | ``parent``
2 | ==========
3 |
4 | When a template uses inheritance, it's possible to render the contents of the
5 | parent block when overriding a block by using the ``parent`` function:
6 |
7 | .. code-block:: jinja
8 |
9 | {% extends "base.html" %}
10 |
11 | {% block sidebar %}
12 |
Table Of Contents
13 | ...
14 | {{ parent() }}
15 | {% endblock %}
16 |
17 | The ``parent()`` call will return the content of the ``sidebar`` block as
18 | defined in the ``base.html`` template.
19 |
20 | .. seealso:: :doc:`extends<../tags/extends>`, :doc:`block<../functions/block>`, :doc:`block<../tags/block>`
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/source.rst:
--------------------------------------------------------------------------------
1 | ``source``
2 | ==========
3 |
4 | .. versionadded:: 1.15
5 | The source function was added in Twig 1.15.
6 |
7 | The ``source`` function returns the content of a template without rendering it:
8 |
9 | .. code-block:: jinja
10 |
11 | {{ source('template.html') }}
12 | {{ source(some_var) }}
13 |
14 | The function uses the same template loaders as the ones used to include
15 | templates. So, if you are using the filesystem loader, the templates are looked
16 | for in the paths defined by it.
17 |
18 | Arguments
19 | ---------
20 |
21 | * ``name``: The name of the template to read
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/index.rst:
--------------------------------------------------------------------------------
1 | Twig
2 | ====
3 |
4 | .. toctree::
5 | :maxdepth: 2
6 |
7 | intro
8 | templates
9 | api
10 | advanced
11 | internals
12 | recipes
13 | coding_standards
14 | tags/index
15 | filters/index
16 | functions/index
17 | tests/index
18 | installation
19 | deprecated
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/block.rst:
--------------------------------------------------------------------------------
1 | ``block``
2 | =========
3 |
4 | Blocks are used for inheritance and act as placeholders and replacements at
5 | the same time. They are documented in detail in the documentation for the
6 | :doc:`extends<../tags/extends>` tag.
7 |
8 | Block names should consist of alphanumeric characters, and underscores. Dashes
9 | are not permitted.
10 |
11 | .. seealso:: :doc:`block<../functions/block>`, :doc:`parent<../functions/parent>`, :doc:`use<../tags/use>`, :doc:`extends<../tags/extends>`
12 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/do.rst:
--------------------------------------------------------------------------------
1 | ``do``
2 | ======
3 |
4 | .. versionadded:: 1.5
5 | The do tag was added in Twig 1.5.
6 |
7 | The ``do`` tag works exactly like the regular variable expression (``{{ ...
8 | }}``) just that it doesn't print anything:
9 |
10 | .. code-block:: jinja
11 |
12 | {% do 1 + 2 %}
13 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/filter.rst:
--------------------------------------------------------------------------------
1 | ``filter``
2 | ==========
3 |
4 | Filter sections allow you to apply regular Twig filters on a block of template
5 | data. Just wrap the code in the special ``filter`` section:
6 |
7 | .. code-block:: jinja
8 |
9 | {% filter upper %}
10 | This text becomes uppercase
11 | {% endfilter %}
12 |
13 | You can also chain filters:
14 |
15 | .. code-block:: jinja
16 |
17 | {% filter lower|escape %}
18 | SOME TEXT
19 | {% endfilter %}
20 |
21 | {# outputs "<strong>some text</strong>" #}
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/flush.rst:
--------------------------------------------------------------------------------
1 | ``flush``
2 | =========
3 |
4 | .. versionadded:: 1.5
5 | The flush tag was added in Twig 1.5.
6 |
7 | The ``flush`` tag tells Twig to flush the output buffer:
8 |
9 | .. code-block:: jinja
10 |
11 | {% flush %}
12 |
13 | .. note::
14 |
15 | Internally, Twig uses the PHP `flush`_ function.
16 |
17 | .. _`flush`: http://php.net/flush
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/from.rst:
--------------------------------------------------------------------------------
1 | ``from``
2 | ========
3 |
4 | The ``from`` tag imports :doc:`macro<../tags/macro>` names into the current
5 | namespace. The tag is documented in detail in the documentation for the
6 | :doc:`import<../tags/import>` tag.
7 |
8 | .. seealso:: :doc:`macro<../tags/macro>`, :doc:`import<../tags/import>`
9 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/index.rst:
--------------------------------------------------------------------------------
1 | Tags
2 | ====
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | autoescape
8 | block
9 | filter
10 | do
11 | embed
12 | extends
13 | flush
14 | for
15 | from
16 | if
17 | import
18 | include
19 | macro
20 | sandbox
21 | set
22 | spaceless
23 | use
24 | verbatim
25 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/verbatim.rst:
--------------------------------------------------------------------------------
1 | ``verbatim``
2 | ============
3 |
4 | .. versionadded:: 1.12
5 | The ``verbatim`` tag was added in Twig 1.12 (it was named ``raw`` before).
6 |
7 | The ``verbatim`` tag marks sections as being raw text that should not be
8 | parsed. For example to put Twig syntax as example into a template you can use
9 | this snippet:
10 |
11 | .. code-block:: jinja
12 |
13 | {% verbatim %}
14 |
15 | {% for item in seq %}
16 |
{{ item }}
17 | {% endfor %}
18 |
19 | {% endverbatim %}
20 |
21 | .. note::
22 |
23 | The ``verbatim`` tag works in the exact same way as the old ``raw`` tag,
24 | but was renamed to avoid confusion with the ``raw`` filter.
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/constant.rst:
--------------------------------------------------------------------------------
1 | ``constant``
2 | ============
3 |
4 | .. versionadded: 1.13.1
5 | constant now accepts object instances as the second argument.
6 |
7 | ``constant`` checks if a variable has the exact same value as a constant. You
8 | can use either global constants or class constants:
9 |
10 | .. code-block:: jinja
11 |
12 | {% if post.status is constant('Post::PUBLISHED') %}
13 | the status attribute is exactly the same as Post::PUBLISHED
14 | {% endif %}
15 |
16 | You can test constants from object instances as well:
17 |
18 | .. code-block:: jinja
19 |
20 | {% if post.status is constant('PUBLISHED', post) %}
21 | the status attribute is exactly the same as Post::PUBLISHED
22 | {% endif %}
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/defined.rst:
--------------------------------------------------------------------------------
1 | ``defined``
2 | ===========
3 |
4 | ``defined`` checks if a variable is defined in the current context. This is very
5 | useful if you use the ``strict_variables`` option:
6 |
7 | .. code-block:: jinja
8 |
9 | {# defined works with variable names #}
10 | {% if foo is defined %}
11 | ...
12 | {% endif %}
13 |
14 | {# and attributes on variables names #}
15 | {% if foo.bar is defined %}
16 | ...
17 | {% endif %}
18 |
19 | {% if foo['bar'] is defined %}
20 | ...
21 | {% endif %}
22 |
23 | When using the ``defined`` test on an expression that uses variables in some
24 | method calls, be sure that they are all defined first:
25 |
26 | .. code-block:: jinja
27 |
28 | {% if var is defined and foo.method(var) is defined %}
29 | ...
30 | {% endif %}
31 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/divisibleby.rst:
--------------------------------------------------------------------------------
1 | ``divisible by``
2 | ================
3 |
4 | .. versionadded:: 1.14.2
5 | The ``divisible by`` test was added in Twig 1.14.2 as an alias for
6 | ``divisibleby``.
7 |
8 | ``divisible by`` checks if a variable is divisible by a number:
9 |
10 | .. code-block:: jinja
11 |
12 | {% if loop.index is divisible by(3) %}
13 | ...
14 | {% endif %}
15 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/empty.rst:
--------------------------------------------------------------------------------
1 | ``empty``
2 | =========
3 |
4 | ``empty`` checks if a variable is empty:
5 |
6 | .. code-block:: jinja
7 |
8 | {# evaluates to true if the foo variable is null, false, an empty array, or the empty string #}
9 | {% if foo is empty %}
10 | ...
11 | {% endif %}
12 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/even.rst:
--------------------------------------------------------------------------------
1 | ``even``
2 | ========
3 |
4 | ``even`` returns ``true`` if the given number is even:
5 |
6 | .. code-block:: jinja
7 |
8 | {{ var is even }}
9 |
10 | .. seealso:: :doc:`odd<../tests/odd>`
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/index.rst:
--------------------------------------------------------------------------------
1 | Tests
2 | =====
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | constant
8 | defined
9 | divisibleby
10 | empty
11 | even
12 | iterable
13 | null
14 | odd
15 | sameas
16 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/iterable.rst:
--------------------------------------------------------------------------------
1 | ``iterable``
2 | ============
3 |
4 | .. versionadded:: 1.7
5 | The iterable test was added in Twig 1.7.
6 |
7 | ``iterable`` checks if a variable is an array or a traversable object:
8 |
9 | .. code-block:: jinja
10 |
11 | {# evaluates to true if the foo variable is iterable #}
12 | {% if users is iterable %}
13 | {% for user in users %}
14 | Hello {{ user }}!
15 | {% endfor %}
16 | {% else %}
17 | {# users is probably a string #}
18 | Hello {{ users }}!
19 | {% endif %}
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/null.rst:
--------------------------------------------------------------------------------
1 | ``null``
2 | ========
3 |
4 | ``null`` returns ``true`` if the variable is ``null``:
5 |
6 | .. code-block:: jinja
7 |
8 | {{ var is null }}
9 |
10 | .. note::
11 |
12 | ``none`` is an alias for ``null``.
13 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/odd.rst:
--------------------------------------------------------------------------------
1 | ``odd``
2 | =======
3 |
4 | ``odd`` returns ``true`` if the given number is odd:
5 |
6 | .. code-block:: jinja
7 |
8 | {{ var is odd }}
9 |
10 | .. seealso:: :doc:`even<../tests/even>`
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/sameas.rst:
--------------------------------------------------------------------------------
1 | ``same as``
2 | ===========
3 |
4 | .. versionadded:: 1.14.2
5 | The ``same as`` test was added in Twig 1.14.2 as an alias for ``sameas``.
6 |
7 | ``same as`` checks if a variable is the same as another variable.
8 | This is the equivalent to ``===`` in PHP:
9 |
10 | .. code-block:: jinja
11 |
12 | {% if foo.attribute is same as(false) %}
13 | the foo attribute really is the 'false' PHP value
14 | {% endif %}
15 |
--------------------------------------------------------------------------------
/vendor/twig/twig/ext/twig/.gitignore:
--------------------------------------------------------------------------------
1 | *.sw*
2 | .deps
3 | Makefile
4 | Makefile.fragments
5 | Makefile.global
6 | Makefile.objects
7 | acinclude.m4
8 | aclocal.m4
9 | build/
10 | config.cache
11 | config.guess
12 | config.h
13 | config.h.in
14 | config.log
15 | config.nice
16 | config.status
17 | config.sub
18 | configure
19 | configure.in
20 | install-sh
21 | libtool
22 | ltmain.sh
23 | missing
24 | mkinstalldirs
25 | run-tests.php
26 | twig.loT
27 | .libs/
28 | modules/
29 | twig.la
30 | twig.lo
31 |
--------------------------------------------------------------------------------
/vendor/twig/twig/ext/twig/config.m4:
--------------------------------------------------------------------------------
1 | dnl config.m4 for extension twig
2 |
3 | PHP_ARG_ENABLE(twig, whether to enable twig support,
4 | [ --enable-twig Enable twig support])
5 |
6 | if test "$PHP_TWIG" != "no"; then
7 | PHP_NEW_EXTENSION(twig, twig.c, $ext_shared)
8 | fi
9 |
--------------------------------------------------------------------------------
/vendor/twig/twig/ext/twig/config.w32:
--------------------------------------------------------------------------------
1 | // vim:ft=javascript
2 |
3 | ARG_ENABLE("twig", "Twig support", "no");
4 |
5 | if (PHP_TWIG != "no") {
6 | AC_DEFINE('HAVE_TWIG', 1);
7 | EXTENSION('twig', 'twig.c');
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Error/Runtime.php:
--------------------------------------------------------------------------------
1 |
17 | */
18 | class Twig_Error_Runtime extends Twig_Error
19 | {
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Error/Syntax.php:
--------------------------------------------------------------------------------
1 |
17 | */
18 | class Twig_Error_Syntax extends Twig_Error
19 | {
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php:
--------------------------------------------------------------------------------
1 |
16 | *
17 | * @deprecated since 1.12 (to be removed in 3.0)
18 | */
19 | interface Twig_ExistsLoaderInterface
20 | {
21 | /**
22 | * Check if we have the source code of a template, given its name.
23 | *
24 | * @param string $name The name of the template to check if we can load
25 | *
26 | * @return bool If the template source code is handled by this loader or not
27 | */
28 | public function exists($name);
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Extension/Optimizer.php:
--------------------------------------------------------------------------------
1 | optimizers = $optimizers;
18 | }
19 |
20 | /**
21 | * {@inheritdoc}
22 | */
23 | public function getNodeVisitors()
24 | {
25 | return array(new Twig_NodeVisitor_Optimizer($this->optimizers));
26 | }
27 |
28 | /**
29 | * {@inheritdoc}
30 | */
31 | public function getName()
32 | {
33 | return 'optimizer';
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/FilterCallableInterface.php:
--------------------------------------------------------------------------------
1 |
18 | * @deprecated since 1.12 (to be removed in 2.0)
19 | */
20 | interface Twig_FilterCallableInterface
21 | {
22 | public function getCallable();
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php:
--------------------------------------------------------------------------------
1 |
18 | * @deprecated since 1.12 (to be removed in 2.0)
19 | */
20 | interface Twig_FunctionCallableInterface
21 | {
22 | public function getCallable();
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Body.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | class Twig_Node_Body extends Twig_Node
18 | {
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression.php:
--------------------------------------------------------------------------------
1 |
17 | */
18 | abstract class Twig_Node_Expression extends Twig_Node
19 | {
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php:
--------------------------------------------------------------------------------
1 | raw('$context[')
24 | ->string($this->getAttribute('name'))
25 | ->raw(']')
26 | ;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php:
--------------------------------------------------------------------------------
1 | raw('+');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php:
--------------------------------------------------------------------------------
1 | raw('&&');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php:
--------------------------------------------------------------------------------
1 | raw('&');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php:
--------------------------------------------------------------------------------
1 | raw('|');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php:
--------------------------------------------------------------------------------
1 | raw('^');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php:
--------------------------------------------------------------------------------
1 | raw('.');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php:
--------------------------------------------------------------------------------
1 | raw('/');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php:
--------------------------------------------------------------------------------
1 | raw('==');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php:
--------------------------------------------------------------------------------
1 | raw('intval(floor(');
21 | parent::compile($compiler);
22 | $compiler->raw('))');
23 | }
24 |
25 | public function operator(Twig_Compiler $compiler)
26 | {
27 | return $compiler->raw('/');
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php:
--------------------------------------------------------------------------------
1 | raw('>');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php:
--------------------------------------------------------------------------------
1 | raw('>=');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php:
--------------------------------------------------------------------------------
1 | raw('<');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php:
--------------------------------------------------------------------------------
1 | raw('<=');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php:
--------------------------------------------------------------------------------
1 | raw('preg_match(')
17 | ->subcompile($this->getNode('right'))
18 | ->raw(', ')
19 | ->subcompile($this->getNode('left'))
20 | ->raw(')')
21 | ;
22 | }
23 |
24 | public function operator(Twig_Compiler $compiler)
25 | {
26 | return $compiler->raw('');
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php:
--------------------------------------------------------------------------------
1 | raw('%');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php:
--------------------------------------------------------------------------------
1 | raw('*');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php:
--------------------------------------------------------------------------------
1 | raw('!=');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php:
--------------------------------------------------------------------------------
1 | raw('||');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php:
--------------------------------------------------------------------------------
1 | raw('(0 === strpos(')
17 | ->subcompile($this->getNode('left'))
18 | ->raw(', ')
19 | ->subcompile($this->getNode('right'))
20 | ->raw('))')
21 | ;
22 | }
23 |
24 | public function operator(Twig_Compiler $compiler)
25 | {
26 | return $compiler->raw('');
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php:
--------------------------------------------------------------------------------
1 | raw('-');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php:
--------------------------------------------------------------------------------
1 | $value), $lineno);
17 | }
18 |
19 | public function compile(Twig_Compiler $compiler)
20 | {
21 | $compiler->repr($this->getAttribute('value'));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php:
--------------------------------------------------------------------------------
1 | $name), $lineno);
16 | }
17 |
18 | public function compile(Twig_Compiler $compiler)
19 | {
20 | $compiler
21 | ->raw('$_')
22 | ->raw($this->getAttribute('name'))
23 | ->raw('_')
24 | ;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php:
--------------------------------------------------------------------------------
1 |
16 | * {{ var is even }}
17 | *
18 | *
19 | * @author Fabien Potencier
20 | */
21 | class Twig_Node_Expression_Test_Even extends Twig_Node_Expression_Test
22 | {
23 | public function compile(Twig_Compiler $compiler)
24 | {
25 | $compiler
26 | ->raw('(')
27 | ->subcompile($this->getNode('node'))
28 | ->raw(' % 2 == 0')
29 | ->raw(')')
30 | ;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php:
--------------------------------------------------------------------------------
1 |
16 | * {{ var is none }}
17 | *
18 | *
19 | * @author Fabien Potencier
20 | */
21 | class Twig_Node_Expression_Test_Null extends Twig_Node_Expression_Test
22 | {
23 | public function compile(Twig_Compiler $compiler)
24 | {
25 | $compiler
26 | ->raw('(null === ')
27 | ->subcompile($this->getNode('node'))
28 | ->raw(')')
29 | ;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php:
--------------------------------------------------------------------------------
1 |
16 | * {{ var is odd }}
17 | *
18 | *
19 | * @author Fabien Potencier
20 | */
21 | class Twig_Node_Expression_Test_Odd extends Twig_Node_Expression_Test
22 | {
23 | public function compile(Twig_Compiler $compiler)
24 | {
25 | $compiler
26 | ->raw('(')
27 | ->subcompile($this->getNode('node'))
28 | ->raw(' % 2 == 1')
29 | ->raw(')')
30 | ;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | class Twig_Node_Expression_Test_Sameas extends Twig_Node_Expression_Test
18 | {
19 | public function compile(Twig_Compiler $compiler)
20 | {
21 | $compiler
22 | ->raw('(')
23 | ->subcompile($this->getNode('node'))
24 | ->raw(' === ')
25 | ->subcompile($this->getNode('arguments')->getNode(0))
26 | ->raw(')')
27 | ;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php:
--------------------------------------------------------------------------------
1 | raw('-');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php:
--------------------------------------------------------------------------------
1 | raw('!');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php:
--------------------------------------------------------------------------------
1 | raw('+');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/NodeInterface.php:
--------------------------------------------------------------------------------
1 |
16 | *
17 | * @deprecated since 1.12 (to be removed in 3.0)
18 | */
19 | interface Twig_NodeInterface extends Countable, IteratorAggregate
20 | {
21 | /**
22 | * Compiles the node to PHP.
23 | *
24 | * @param Twig_Compiler A Twig_Compiler instance
25 | */
26 | public function compile(Twig_Compiler $compiler);
27 |
28 | public function getLine();
29 |
30 | public function getNodeTag();
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/NodeOutputInterface.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | interface Twig_NodeOutputInterface
18 | {
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | class Twig_Sandbox_SecurityError extends Twig_Error
18 | {
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | interface Twig_Sandbox_SecurityPolicyInterface
18 | {
19 | public function checkSecurity($tags, $filters, $functions);
20 |
21 | public function checkMethodAllowed($obj, $method);
22 |
23 | public function checkPropertyAllowed($obj, $method);
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/TestCallableInterface.php:
--------------------------------------------------------------------------------
1 |
16 | * @deprecated since 1.12 (to be removed in 2.0)
17 | */
18 | interface Twig_TestCallableInterface
19 | {
20 | public function getCallable();
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/TestInterface.php:
--------------------------------------------------------------------------------
1 |
16 | * @deprecated since 1.12 (to be removed in 2.0)
17 | */
18 | interface Twig_TestInterface
19 | {
20 | /**
21 | * Compiles a test.
22 | *
23 | * @return string The PHP code for the test
24 | */
25 | public function compile();
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/twig/twig/lib/Twig/TokenParser.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | abstract class Twig_TokenParser implements Twig_TokenParserInterface
18 | {
19 | /**
20 | * @var Twig_Parser
21 | */
22 | protected $parser;
23 |
24 | /**
25 | * Sets the parser associated with this token parser
26 | *
27 | * @param $parser A Twig_Parser instance
28 | */
29 | public function setParser(Twig_Parser $parser)
30 | {
31 | $this->parser = $parser;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 | ./test/Twig/
17 |
18 |
19 |
20 |
21 |
22 | ./lib/Twig/
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/AutoloaderTest.php:
--------------------------------------------------------------------------------
1 | assertFalse(class_exists('FooBarFoo'), '->autoload() does not try to load classes that does not begin with Twig');
17 |
18 | $autoloader = new Twig_Autoloader();
19 | $this->assertNull($autoloader->autoload('Foo'), '->autoload() returns false if it is not able to load a class');
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/base.html:
--------------------------------------------------------------------------------
1 | {% block content %}{% endblock %}
2 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 | {% block content %}
3 | {{ foo.bar }}
4 | {% endblock %}
5 | {% block foo %}
6 | {{ foo.bar }}
7 | {% endblock %}
8 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/unclosed_tag.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Exception for an unclosed tag
3 | --TEMPLATE--
4 | {% block foo %}
5 | {% if foo %}
6 |
7 |
8 |
9 |
10 | {% for i in fo %}
11 |
12 |
13 |
14 | {% endfor %}
15 |
16 |
17 |
18 | {% endblock %}
19 | --EXCEPTION--
20 | Twig_Error_Syntax: Unexpected tag name "endblock" (expecting closing tag for the "if" tag defined near line 4) in "index.twig" at line 16
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_trait.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Exception for an undefined trait
3 | --TEMPLATE--
4 | {% use 'foo' with foobar as bar %}
5 | --TEMPLATE(foo)--
6 | {% block bar %}
7 | {% endblock %}
8 | --EXCEPTION--
9 | Twig_Error_Runtime: Block "foobar" is not defined in trait "foo" in "index.twig".
10 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports method calls
3 | --TEMPLATE--
4 | {{ items.foo }}
5 | {{ items['foo'] }}
6 | {{ items[foo] }}
7 | {{ items[items[foo]] }}
8 | --DATA--
9 | return array('foo' => 'bar', 'items' => array('foo' => 'bar', 'bar' => 'foo'))
10 | --EXPECT--
11 | bar
12 | bar
13 | foo
14 | bar
15 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports binary operations (+, -, *, /, ~, %, and, or)
3 | --TEMPLATE--
4 | {{ 1 + 1 }}
5 | {{ 2 - 1 }}
6 | {{ 2 * 2 }}
7 | {{ 2 / 2 }}
8 | {{ 3 % 2 }}
9 | {{ 1 and 1 }}
10 | {{ 1 and 0 }}
11 | {{ 0 and 1 }}
12 | {{ 0 and 0 }}
13 | {{ 1 or 1 }}
14 | {{ 1 or 0 }}
15 | {{ 0 or 1 }}
16 | {{ 0 or 0 }}
17 | {{ 0 or 1 and 0 }}
18 | {{ 1 or 0 and 1 }}
19 | {{ "foo" ~ "bar" }}
20 | {{ foo ~ "bar" }}
21 | {{ "foo" ~ bar }}
22 | {{ foo ~ bar }}
23 | {{ 20 // 7 }}
24 | --DATA--
25 | return array('foo' => 'bar', 'bar' => 'foo')
26 | --EXPECT--
27 | 2
28 | 1
29 | 4
30 | 1
31 | 1
32 | 1
33 |
34 |
35 |
36 | 1
37 | 1
38 | 1
39 |
40 |
41 | 1
42 | foobar
43 | barbar
44 | foofoo
45 | barfoo
46 | 2
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports bitwise operations
3 | --TEMPLATE--
4 | {{ 1 b-and 5 }}
5 | {{ 1 b-or 5 }}
6 | {{ 1 b-xor 5 }}
7 | {{ (1 and 0 b-or 0) is same as(1 and (0 b-or 0)) ? 'ok' : 'ko' }}
8 | --DATA--
9 | return array()
10 | --EXPECT--
11 | 1
12 | 5
13 | 4
14 | ok
15 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports comparison operators (==, !=, <, >, >=, <=)
3 | --TEMPLATE--
4 | {{ 1 > 2 }}/{{ 1 > 1 }}/{{ 1 >= 2 }}/{{ 1 >= 1 }}
5 | {{ 1 < 2 }}/{{ 1 < 1 }}/{{ 1 <= 2 }}/{{ 1 <= 1 }}
6 | {{ 1 == 1 }}/{{ 1 == 2 }}
7 | {{ 1 != 1 }}/{{ 1 != 2 }}
8 | --DATA--
9 | return array()
10 | --EXPECT--
11 | ///1
12 | 1//1/1
13 | 1/
14 | /1
15 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the "divisible by" operator
3 | --TEMPLATE--
4 | {{ 8 is divisible by(2) ? 'OK' }}
5 | {{ 8 is not divisible by(3) ? 'OK' }}
6 | {{ 8 is divisible by (2) ? 'OK' }}
7 | {{ 8 is not
8 | divisible
9 | by
10 | (3) ? 'OK' }}
11 | --DATA--
12 | return array()
13 | --EXPECT--
14 | OK
15 | OK
16 | OK
17 | OK
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the .. operator
3 | --TEMPLATE--
4 | {% for i in 0..10 %}{{ i }} {% endfor %}
5 |
6 | {% for letter in 'a'..'z' %}{{ letter }} {% endfor %}
7 |
8 | {% for letter in 'a'|upper..'z'|upper %}{{ letter }} {% endfor %}
9 |
10 | {% for i in foo[0]..foo[1] %}{{ i }} {% endfor %}
11 |
12 | {% for i in 0 + 1 .. 10 - 1 %}{{ i }} {% endfor %}
13 | --DATA--
14 | return array('foo' => array(1, 10))
15 | --EXPECT--
16 | 0 1 2 3 4 5 6 7 8 9 10
17 | a b c d e f g h i j k l m n o p q r s t u v w x y z
18 | A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
19 | 1 2 3 4 5 6 7 8 9 10
20 | 1 2 3 4 5 6 7 8 9
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the "ends with" operator
3 | --TEMPLATE--
4 | {{ 'foo' ends with 'o' ? 'OK' : 'KO' }}
5 | {{ not ('foo' ends with 'f') ? 'OK' : 'KO' }}
6 | {{ not ('foo' ends with 'foowaytoolong') ? 'OK' : 'KO' }}
7 | --DATA--
8 | return array()
9 | --EXPECT--
10 | OK
11 | OK
12 | OK
13 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports grouping of expressions
3 | --TEMPLATE--
4 | {{ (2 + 2) / 2 }}
5 | --DATA--
6 | return array()
7 | --EXPECT--
8 | 2
9 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports literals
3 | --TEMPLATE--
4 | 1 {{ true }}
5 | 2 {{ TRUE }}
6 | 3 {{ false }}
7 | 4 {{ FALSE }}
8 | 5 {{ none }}
9 | 6 {{ NONE }}
10 | 7 {{ null }}
11 | 8 {{ NULL }}
12 | --DATA--
13 | return array()
14 | --EXPECT--
15 | 1 1
16 | 2 1
17 | 3
18 | 4
19 | 5
20 | 6
21 | 7
22 | 8
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports __call() for attributes
3 | --TEMPLATE--
4 | {{ foo.foo }}
5 | {{ foo.bar }}
6 | --DATA--
7 | class TestClassForMagicCallAttributes
8 | {
9 | public function getBar()
10 | {
11 | return 'bar_from_getbar';
12 | }
13 |
14 | public function __call($method, $arguments)
15 | {
16 | if ('foo' === $method)
17 | {
18 | return 'foo_from_call';
19 | }
20 |
21 | return false;
22 | }
23 | }
24 | return array('foo' => new TestClassForMagicCallAttributes())
25 | --EXPECT--
26 | foo_from_call
27 | bar_from_getbar
28 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the "matches" operator
3 | --TEMPLATE--
4 | {{ 'foo' matches '/o/' ? 'OK' : 'KO' }}
5 | {{ 'foo' matches '/^fo/' ? 'OK' : 'KO' }}
6 | {{ 'foo' matches '/O/i' ? 'OK' : 'KO' }}
7 | --DATA--
8 | return array()
9 | --EXPECT--
10 | OK
11 | OK
12 | OK
13 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports method calls
3 | --TEMPLATE--
4 | {{ items.foo.foo }}
5 | {{ items.foo.getFoo() }}
6 | {{ items.foo.bar }}
7 | {{ items.foo['bar'] }}
8 | {{ items.foo.bar('a', 43) }}
9 | {{ items.foo.bar(foo) }}
10 | {{ items.foo.self.foo() }}
11 | {{ items.foo.is }}
12 | {{ items.foo.in }}
13 | {{ items.foo.not }}
14 | --DATA--
15 | return array('foo' => 'bar', 'items' => array('foo' => new TwigTestFoo(), 'bar' => 'foo'))
16 | --CONFIG--
17 | return array('strict_variables' => false)
18 | --EXPECT--
19 | foo
20 | foo
21 | bar
22 |
23 | bar_a-43
24 | bar_bar
25 | foo
26 | is
27 | in
28 | not
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig allows to use named operators as variable names
3 | --TEMPLATE--
4 | {% for match in matches %}
5 | {{- match }}
6 | {% endfor %}
7 | {{ in }}
8 | {{ is }}
9 | --DATA--
10 | return array('matches' => array(1, 2, 3), 'in' => 'in', 'is' => 'is')
11 | --EXPECT--
12 | 1
13 | 2
14 | 3
15 | in
16 | is
17 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig parses postfix expressions
3 | --TEMPLATE--
4 | {% import _self as macros %}
5 |
6 | {% macro foo() %}foo{% endmacro %}
7 |
8 | {{ 'a' }}
9 | {{ 'a'|upper }}
10 | {{ ('a')|upper }}
11 | {{ -1|upper }}
12 | {{ macros.foo() }}
13 | {{ (macros).foo() }}
14 | --DATA--
15 | return array();
16 | --EXPECT--
17 | a
18 | A
19 | A
20 | -1
21 | foo
22 | foo
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the "same as" operator
3 | --TEMPLATE--
4 | {{ 1 is same as(1) ? 'OK' }}
5 | {{ 1 is not same as(true) ? 'OK' }}
6 | {{ 1 is same as(1) ? 'OK' }}
7 | {{ 1 is not same as(true) ? 'OK' }}
8 | {{ 1 is same as (1) ? 'OK' }}
9 | {{ 1 is not
10 | same
11 | as
12 | (true) ? 'OK' }}
13 | --DATA--
14 | return array()
15 | --EXPECT--
16 | OK
17 | OK
18 | OK
19 | OK
20 | OK
21 | OK
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the "starts with" operator
3 | --TEMPLATE--
4 | {{ 'foo' starts with 'f' ? 'OK' : 'KO' }}
5 | {{ not ('foo' starts with 'oo') ? 'OK' : 'KO' }}
6 | {{ not ('foo' starts with 'foowaytoolong') ? 'OK' : 'KO' }}
7 | {{ 'foo' starts with 'f' ? 'OK' : 'KO' }}
8 | {{ 'foo' starts
9 | with 'f' ? 'OK' : 'KO' }}
10 | --DATA--
11 | return array()
12 | --EXPECT--
13 | OK
14 | OK
15 | OK
16 | OK
17 | OK
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports string interpolation
3 | --TEMPLATE--
4 | {{ "foo #{"foo #{bar} baz"} baz" }}
5 | {{ "foo #{bar}#{bar} baz" }}
6 | --DATA--
7 | return array('bar' => 'BAR');
8 | --EXPECT--
9 | foo foo BAR baz baz
10 | foo BARBAR baz
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the ternary operator
3 | --TEMPLATE--
4 | {{ 1 ? 'YES' : 'NO' }}
5 | {{ 0 ? 'YES' : 'NO' }}
6 | {{ 0 ? 'YES' : (1 ? 'YES1' : 'NO1') }}
7 | {{ 0 ? 'YES' : (0 ? 'YES1' : 'NO1') }}
8 | {{ 1 == 1 ? 'foo ':'' }}
9 | {{ foo ~ (bar ? ('-' ~ bar) : '') }}
10 | --DATA--
11 | return array('foo' => 'foo', 'bar' => 'bar')
12 | --EXPECT--
13 | YES
14 | NO
15 | YES1
16 | NO1
17 | foo
18 | foo-bar
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the ternary operator
3 | --TEMPLATE--
4 | {{ 1 ? 'YES' }}
5 | {{ 0 ? 'YES' }}
6 | --DATA--
7 | return array()
8 | --EXPECT--
9 | YES
10 |
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports the ternary operator
3 | --TEMPLATE--
4 | {{ 'YES' ?: 'NO' }}
5 | {{ 0 ?: 'NO' }}
6 | --DATA--
7 | return array()
8 | --EXPECT--
9 | YES
10 | NO
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig does not allow to use two-word named operators as variable names
3 | --TEMPLATE--
4 | {{ starts with }}
5 | --DATA--
6 | return array()
7 | --EXCEPTION--
8 | Twig_Error_Syntax: Unexpected token "operator" of value "starts with" in "index.twig" at line 2
9 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig supports unary operators (not, -, +)
3 | --TEMPLATE--
4 | {{ not 1 }}/{{ not 0 }}
5 | {{ +1 + 1 }}/{{ -1 - 1 }}
6 | {{ not (false or true) }}
7 | --DATA--
8 | return array()
9 | --EXPECT--
10 | /1
11 | 2/-2
12 |
13 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Twig unary operators precedence
3 | --TEMPLATE--
4 | {{ -1 - 1 }}
5 | {{ -1 - -1 }}
6 | {{ -1 * -1 }}
7 | {{ 4 / -1 * 5 }}
8 | --DATA--
9 | return array()
10 | --EXPECT--
11 | -2
12 | 0
13 | 1
14 | -20
15 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | "abs" filter
3 | --TEMPLATE--
4 | {{ (-5.5)|abs }}
5 | {{ (-5)|abs }}
6 | {{ (-0)|abs }}
7 | {{ 0|abs }}
8 | {{ 5|abs }}
9 | {{ 5.5|abs }}
10 | {{ number1|abs }}
11 | {{ number2|abs }}
12 | {{ number3|abs }}
13 | {{ number4|abs }}
14 | {{ number5|abs }}
15 | {{ number6|abs }}
16 | --DATA--
17 | return array('number1' => -5.5, 'number2' => -5, 'number3' => -0, 'number4' => 0, 'number5' => 5, 'number6' => 5.5)
18 | --EXPECT--
19 | 5.5
20 | 5
21 | 0
22 | 0
23 | 5
24 | 5.5
25 | 5.5
26 | 5
27 | 0
28 | 0
29 | 5
30 | 5.5
31 |
--------------------------------------------------------------------------------
/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test:
--------------------------------------------------------------------------------
1 | --TEST--
2 | "batch" filter
3 | --TEMPLATE--
4 | {% for row in items|batch(3.1) %}
5 |