Lines Matching refs:PHP
24 Twig won't be able to recompile your templates when the PHP code is
130 A filter is a regular PHP function or an object method that takes the left
134 Defining a filter is as easy as associating the filter name with a PHP
141 When compiling this template to PHP, Twig looks for the PHP callable
143 filter, and it is simply mapped to the PHP ``strtolower()`` function. After
144 compilation, the generated PHP code is roughly equivalent to:
150 As you can see, the ``'TWIG'`` string is passed as a first argument to the PHP
185 Here, we use ``Twig_Filter_Function`` as the filter is a PHP function. The
187 of the PHP function to call, here ``str_rot13``, a native PHP function.
197 As the PHP ``str_rot13()`` function does not support this requirement, let's
198 create a new PHP function::
292 following PHP call: ``twig_path('a', 'b', 'foo')``.
297 A function is a regular PHP function or an object method that can be called from
304 When compiling this template to PHP, Twig looks for the PHP callable
306 function, and it is simply mapped to the PHP ``constant()`` function. After
307 compilation, the generated PHP code is roughly equivalent to:
359 following PHP call: ``twig_path('a', 'b', 'foo')``.
390 * Defining a Node class (responsible for converting the parsed code to PHP);
483 developer generate beautiful and readable PHP code:
494 * ``repr()``: Writes a PHP representation of a given value (see
787 responsible for parsing the tag and compiling it to PHP.