Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add strict_properties, array_methods options #3913

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add docs
  • Loading branch information
danog committed Nov 23, 2023
commit b6af0d4fc3d15088559135032b3617bc018467aa
13 changes: 13 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ The following options are available:
replace them with a ``null`` value. When set to ``true``, Twig throws an
exception instead (default to ``false``).

* ``strict_properties`` *boolean*

If set to ``true``, treats property accesses in templates only as
property accesses, without ever trying to invoke methods
with the same name (or `get{name}` methods) if the property
does not exist (defaults to ``false``).


* ``array_methods`` *boolean*

If ``true``, treats method calls on callable array elements
as if they were object method calls (defaults to ``false``).

* ``autoescape`` *string*

Sets the default auto-escaping strategy (``name``, ``html``, ``js``, ``css``,
Expand Down