SecurityPolicy
class SecurityPolicy implements Policy
Default-deny security policy. Allowlist permitted tags, filters, functions, methods, and properties.
Constants
| All |
|
| ALL |
|
Methods
Creates policy with safe defaults for user-generated templates.
No description
No description
No description
Adds methods of the given class (or its subclasses) to the allowlist.
Adds properties of the given class (or its subclasses) to the allowlist.
No description
No description
No description
No description
No description
Details
at line 47
static SecurityPolicy
createSafePolicy()
Creates policy with safe defaults for user-generated templates.
at line 82
SecurityPolicy
allowTags(array $tags)
No description
at line 92
SecurityPolicy
allowFilters(array $filters)
No description
at line 102
SecurityPolicy
allowFunctions(array $functions)
No description
at line 114
SecurityPolicy
allowMethods(string $class, array $methods)
Adds methods of the given class (or its subclasses) to the allowlist.
Use SecurityPolicy::All to allow all methods.
at line 127
SecurityPolicy
allowProperties(string $class, array $properties)
Adds properties of the given class (or its subclasses) to the allowlist.
Use SecurityPolicy::All to allow all properties.
at line 135
bool
isTagAllowed(string $tag)
No description
at line 141
bool
isFilterAllowed(string $filter)
No description
at line 147
bool
isFunctionAllowed(string $function)
No description
at line 153
bool
isMethodAllowed(string $class, string $method)
No description
at line 172
bool
isPropertyAllowed(string $class, string $property)
No description