mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-01 21:17:21 +00:00
[docs] CoreExtension::setEscaper is deprecated
This commit is contained in:
@@ -100,7 +100,7 @@ used in the ``escape`` call) and the second one must be a valid PHP callable:
|
||||
.. code-block:: php
|
||||
|
||||
$twig = new \Twig\Environment($loader);
|
||||
$twig->getExtension(\Twig\Extension\CoreExtension::class)->setEscaper('csv', 'csv_escaper');
|
||||
$twig->getExtension(\Twig\Extension\EscaperExtension::class)->setEscaper('csv', 'csv_escaper');
|
||||
|
||||
When called by Twig, the callable receives the Twig environment instance, the
|
||||
string to escape, and the charset.
|
||||
|
||||
Reference in New Issue
Block a user