mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
minor #4296 Clarify docs on registerUndefinedTokenParserCallback() (fabpot)
This PR was merged into the 3.x branch.
Discussion
----------
Clarify docs on registerUndefinedTokenParserCallback()
Closes #3762
Commits
-------
d1b05519af Clarify docs on registerUndefinedTokenParserCallback()
This commit is contained in:
@@ -300,6 +300,14 @@ does not return ``false``.
|
||||
As the resolution of functions/filters/tags is done during compilation,
|
||||
there is no overhead when registering these callbacks.
|
||||
|
||||
.. warning::
|
||||
|
||||
As parsing a tag is specific to each tag (the syntax is free form), the
|
||||
``registerUndefinedTokenParserCallback()`` cannot be used to define a
|
||||
default implementation for all unknown tags. It's mainly useful to override
|
||||
the default exception or to register on the fly TokenParser instances for
|
||||
specific known tags.
|
||||
|
||||
Validating the Template Syntax
|
||||
------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user