mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 12:06:56 +00:00
Merge branch '2.x' into 3.x
* 2.x: Fix URLs Replace secure.php.net with www.php.net
This commit is contained in:
+1
-1
@@ -15,4 +15,4 @@ The ``abs`` filter returns the absolute value.
|
||||
|
||||
Internally, Twig uses the PHP `abs`_ function.
|
||||
|
||||
.. _`abs`: https://secure.php.net/abs
|
||||
.. _`abs`: https://www.php.net/abs
|
||||
|
||||
@@ -21,4 +21,4 @@ Arguments
|
||||
|
||||
* ``name``: The column name to extract
|
||||
|
||||
.. _`array_column`: https://secure.php.net/array_column
|
||||
.. _`array_column`: https://www.php.net/array_column
|
||||
|
||||
@@ -19,4 +19,4 @@ Arguments
|
||||
* ``to``: The output charset
|
||||
* ``from``: The input charset
|
||||
|
||||
.. _`iconv`: https://secure.php.net/iconv
|
||||
.. _`iconv`: https://www.php.net/iconv
|
||||
|
||||
@@ -71,8 +71,8 @@ Arguments
|
||||
* ``format``: The date format
|
||||
* ``timezone``: The date timezone
|
||||
|
||||
.. _`strtotime`: https://secure.php.net/strtotime
|
||||
.. _`DateTime`: https://secure.php.net/DateTime
|
||||
.. _`DateInterval`: https://secure.php.net/DateInterval
|
||||
.. _`date`: https://secure.php.net/date
|
||||
.. _`DateInterval::format`: https://secure.php.net/DateInterval.format
|
||||
.. _`strtotime`: https://www.php.net/strtotime
|
||||
.. _`DateTime`: https://www.php.net/DateTime
|
||||
.. _`DateInterval`: https://www.php.net/DateInterval
|
||||
.. _`date`: https://www.php.net/date
|
||||
.. _`DateInterval::format`: https://www.php.net/DateInterval.format
|
||||
|
||||
@@ -16,5 +16,5 @@ Arguments
|
||||
|
||||
* ``modifier``: The modifier
|
||||
|
||||
.. _`strtotime`: https://secure.php.net/strtotime
|
||||
.. _`DateTime`: https://secure.php.net/DateTime
|
||||
.. _`strtotime`: https://www.php.net/strtotime
|
||||
.. _`DateTime`: https://www.php.net/DateTime
|
||||
|
||||
@@ -114,4 +114,4 @@ Arguments
|
||||
* ``strategy``: The escaping strategy
|
||||
* ``charset``: The string charset
|
||||
|
||||
.. _`htmlspecialchars`: https://secure.php.net/htmlspecialchars
|
||||
.. _`htmlspecialchars`: https://www.php.net/htmlspecialchars
|
||||
|
||||
@@ -19,4 +19,4 @@ a string:
|
||||
|
||||
It also works with objects implementing the `Traversable`_ interface.
|
||||
|
||||
.. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
|
||||
.. _`Traversable`: https://www.php.net/manual/en/class.traversable.php
|
||||
|
||||
@@ -15,4 +15,4 @@ The ``format`` filter formats a given string by replacing the placeholders
|
||||
|
||||
:doc:`replace<replace>`
|
||||
|
||||
.. _`sprintf`: https://secure.php.net/sprintf
|
||||
.. _`sprintf`: https://www.php.net/sprintf
|
||||
|
||||
@@ -19,5 +19,5 @@ Arguments
|
||||
Combine constants using :ref:`bitwise operators<template_logic>`:
|
||||
``{{ data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT')) }}``
|
||||
|
||||
.. _`json_encode`: https://secure.php.net/json_encode
|
||||
.. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php
|
||||
.. _`json_encode`: https://www.php.net/json_encode
|
||||
.. _`json_encode options`: https://www.php.net/manual/en/json.constants.php
|
||||
|
||||
@@ -19,4 +19,4 @@ a string:
|
||||
|
||||
It also works with objects implementing the `Traversable`_ interface.
|
||||
|
||||
.. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
|
||||
.. _`Traversable`: https://www.php.net/manual/en/class.traversable.php
|
||||
|
||||
@@ -45,4 +45,4 @@ overridden.
|
||||
Internally, Twig uses the PHP `array_merge`_ function. It supports
|
||||
Traversable objects by transforming those to arrays.
|
||||
|
||||
.. _`array_merge`: https://secure.php.net/array_merge
|
||||
.. _`array_merge`: https://www.php.net/array_merge
|
||||
|
||||
@@ -48,4 +48,4 @@ Arguments
|
||||
* ``decimal_point``: The character(s) to use for the decimal point
|
||||
* ``thousand_sep``: The character(s) to use for the thousands separator
|
||||
|
||||
.. _`number_format`: https://secure.php.net/number_format
|
||||
.. _`number_format`: https://www.php.net/number_format
|
||||
|
||||
@@ -41,4 +41,4 @@ Arguments
|
||||
|
||||
* ``preserve_keys``: Preserve keys when reversing a mapping or a sequence.
|
||||
|
||||
.. _`Traversable`: https://secure.php.net/Traversable
|
||||
.. _`Traversable`: https://www.php.net/Traversable
|
||||
|
||||
@@ -62,7 +62,7 @@ Arguments
|
||||
* ``length``: The size of the slice
|
||||
* ``preserve_keys``: Whether to preserve key or not (when the input is an array)
|
||||
|
||||
.. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
|
||||
.. _`array_slice`: https://secure.php.net/array_slice
|
||||
.. _`mb_substr`: https://secure.php.net/mb-substr
|
||||
.. _`substr`: https://secure.php.net/substr
|
||||
.. _`Traversable`: https://www.php.net/manual/en/class.traversable.php
|
||||
.. _`array_slice`: https://www.php.net/array_slice
|
||||
.. _`mb_substr`: https://www.php.net/mb-substr
|
||||
.. _`substr`: https://www.php.net/substr
|
||||
|
||||
@@ -38,5 +38,5 @@ Arguments
|
||||
|
||||
* ``arrow``: An arrow function
|
||||
|
||||
.. _`asort`: https://secure.php.net/asort
|
||||
.. _`asort`: https://www.php.net/asort
|
||||
.. _`spaceship`: https://www.php.net/manual/en/language.operators.comparison.php
|
||||
|
||||
@@ -46,5 +46,5 @@ Arguments
|
||||
* ``delimiter``: The delimiter
|
||||
* ``limit``: The limit argument
|
||||
|
||||
.. _`explode`: https://secure.php.net/explode
|
||||
.. _`str_split`: https://secure.php.net/str_split
|
||||
.. _`explode`: https://www.php.net/explode
|
||||
.. _`str_split`: https://www.php.net/str_split
|
||||
|
||||
@@ -26,4 +26,4 @@ Arguments
|
||||
|
||||
* ``allowable_tags``: Tags which should not be stripped
|
||||
|
||||
.. _`strip_tags`: https://secure.php.net/strip_tags
|
||||
.. _`strip_tags`: https://www.php.net/strip_tags
|
||||
|
||||
@@ -34,6 +34,6 @@ Arguments
|
||||
* ``side``: The default is to strip from the left and the right (`both`) sides, but `left`
|
||||
and `right` will strip from either the left side or right side only
|
||||
|
||||
.. _`trim`: https://secure.php.net/trim
|
||||
.. _`ltrim`: https://secure.php.net/ltrim
|
||||
.. _`rtrim`: https://secure.php.net/rtrim
|
||||
.. _`trim`: https://www.php.net/trim
|
||||
.. _`ltrim`: https://www.php.net/ltrim
|
||||
.. _`rtrim`: https://www.php.net/rtrim
|
||||
|
||||
@@ -19,5 +19,5 @@ or an array as query string:
|
||||
|
||||
Internally, Twig uses the PHP `rawurlencode`_ or the `http_build_query`_ function.
|
||||
|
||||
.. _`rawurlencode`: https://secure.php.net/rawurlencode
|
||||
.. _`http_build_query`: https://secure.php.net/http_build_query
|
||||
.. _`rawurlencode`: https://www.php.net/rawurlencode
|
||||
.. _`http_build_query`: https://www.php.net/http_build_query
|
||||
|
||||
@@ -41,4 +41,4 @@ Arguments
|
||||
* ``date``: The date
|
||||
* ``timezone``: The timezone
|
||||
|
||||
.. _`date and time formats`: https://secure.php.net/manual/en/datetime.formats.php
|
||||
.. _`date and time formats`: https://www.php.net/manual/en/datetime.formats.php
|
||||
|
||||
@@ -63,4 +63,4 @@ Arguments
|
||||
* ``context``: The context to dump
|
||||
|
||||
.. _`XDebug`: https://xdebug.org/docs/display
|
||||
.. _`var_dump`: https://secure.php.net/var_dump
|
||||
.. _`var_dump`: https://www.php.net/var_dump
|
||||
|
||||
@@ -55,4 +55,4 @@ Arguments
|
||||
* ``high``: The highest possible value of the sequence.
|
||||
* ``step``: The increment between elements of the sequence.
|
||||
|
||||
.. _`range`: https://secure.php.net/range
|
||||
.. _`range`: https://www.php.net/range
|
||||
|
||||
+1
-1
@@ -528,4 +528,4 @@ include in your templates:
|
||||
'tag_variable' => ['{[', ']}'],
|
||||
]));
|
||||
|
||||
.. _callback: https://secure.php.net/manual/en/function.is-callable.php
|
||||
.. _callback: https://www.php.net/manual/en/function.is-callable.php
|
||||
|
||||
+1
-1
@@ -11,4 +11,4 @@ The ``flush`` tag tells Twig to flush the output buffer:
|
||||
|
||||
Internally, Twig uses the PHP `flush`_ function.
|
||||
|
||||
.. _`flush`: https://secure.php.net/flush
|
||||
.. _`flush`: https://www.php.net/flush
|
||||
|
||||
+1
-1
@@ -853,7 +853,7 @@ Twig can be extended. If you want to create your own extensions, read the
|
||||
.. _`other Twig syntax mode`: https://github.com/muxx/Twig-HTML.mode
|
||||
.. _`Notepad++ Twig Highlighter`: https://github.com/Banane9/notepadplusplus-twig
|
||||
.. _`web-mode.el`: http://web-mode.org/
|
||||
.. _`regular expressions`: https://secure.php.net/manual/en/pcre.pattern.php
|
||||
.. _`regular expressions`: https://www.php.net/manual/en/pcre.pattern.php
|
||||
.. _`PHP-twig for atom`: https://github.com/reesef/php-twig
|
||||
.. _`TwigFiddle`: https://twigfiddle.com/
|
||||
.. _`Twig pack`: https://marketplace.visualstudio.com/items?itemName=bajdzis.vscode-twig-pack
|
||||
|
||||
@@ -206,7 +206,7 @@ function twig_escape_filter(Environment $env, $string, $strategy = 'html', $char
|
||||
|
||||
switch ($strategy) {
|
||||
case 'html':
|
||||
// see https://secure.php.net/htmlspecialchars
|
||||
// see https://www.php.net/htmlspecialchars
|
||||
|
||||
// Using a static variable to avoid initializing the array
|
||||
// each time the function is called. Moving the declaration on the
|
||||
|
||||
Reference in New Issue
Block a user