SandboxExtension
extends AbstractExtension
in package
FinalYes
Table of Contents
Properties
- $policy : mixed
- $sandboxed : mixed
- $sandboxedGlobally : mixed
- $sourcePolicy : mixed
Methods
- __construct() : mixed
- checkMethodAllowed() : void
- checkPropertyAllowed() : void
- checkSecurity() : void
- disableSandbox() : void
- enableSandbox() : void
- ensureToStringAllowed() : mixed
- getExpressionParsers() : array<string|int, mixed>
- getFilters() : array<string|int, TwigFilter>
- Returns a list of filters to add to the existing list.
- getFunctions() : array<string|int, TwigFunction>
- Returns a list of functions to add to the existing list.
- getLastModified() : int
- Returns the last modification time of the extension for cache invalidation.
- getNodeVisitors() : array<string|int, NodeVisitorInterface>
- Returns the node visitor instances to add to the existing list.
- getOperators() : array<string|int, array<string|int, mixed>>
- Returns a list of operators to add to the existing list.
- getSecurityPolicy() : SecurityPolicyInterface
- getTests() : array<string|int, TwigTest>
- Returns a list of tests to add to the existing list.
- getTokenParsers() : array<string|int, TokenParserInterface>
- Returns the token parser instances to add to the existing list.
- isSandboxed() : bool
- isSandboxedGlobally() : bool
- setSecurityPolicy() : void
- ensureToStringAllowedForArray() : void
- isSourceSandboxed() : bool
Properties
$policy
private
mixed
$policy
$sandboxed
private
mixed
$sandboxed
$sandboxedGlobally
private
mixed
$sandboxedGlobally
$sourcePolicy
private
mixed
$sourcePolicy
Methods
__construct()
public
__construct(SecurityPolicyInterface $policy[, mixed $sandboxed = false ][, SourcePolicyInterface|null $sourcePolicy = null ]) : mixed
Parameters
- $policy : SecurityPolicyInterface
- $sandboxed : mixed = false
- $sourcePolicy : SourcePolicyInterface|null = null
checkMethodAllowed()
public
checkMethodAllowed(mixed $obj, mixed $method[, int $lineno = -1 ][, Source|null $source = null ]) : void
Parameters
- $obj : mixed
- $method : mixed
- $lineno : int = -1
- $source : Source|null = null
checkPropertyAllowed()
public
checkPropertyAllowed(mixed $obj, mixed $property[, int $lineno = -1 ][, Source|null $source = null ]) : void
Parameters
- $obj : mixed
- $property : mixed
- $lineno : int = -1
- $source : Source|null = null
checkSecurity()
public
checkSecurity(mixed $tags, mixed $filters, mixed $functions[, Source|null $source = null ]) : void
Parameters
- $tags : mixed
- $filters : mixed
- $functions : mixed
- $source : Source|null = null
disableSandbox()
public
disableSandbox() : void
enableSandbox()
public
enableSandbox() : void
ensureToStringAllowed()
public
ensureToStringAllowed(mixed $obj[, int $lineno = -1 ][, Source|null $source = null ]) : mixed
Parameters
- $obj : mixed
- $lineno : int = -1
- $source : Source|null = null
Tags
getExpressionParsers()
public
getExpressionParsers() : array<string|int, mixed>
Return values
array<string|int, mixed>getFilters()
Returns a list of filters to add to the existing list.
public
getFilters() : array<string|int, TwigFilter>
Return values
array<string|int, TwigFilter>getFunctions()
Returns a list of functions to add to the existing list.
public
getFunctions() : array<string|int, TwigFunction>
Return values
array<string|int, TwigFunction>getLastModified()
Returns the last modification time of the extension for cache invalidation.
public
getLastModified() : int
This timestamp should be the last time the source code of the extension class and all its dependencies were modified (including the Runtime class).
Return values
intgetNodeVisitors()
Returns the node visitor instances to add to the existing list.
public
getNodeVisitors() : array<string|int, NodeVisitorInterface>
Return values
array<string|int, NodeVisitorInterface>getOperators()
Returns a list of operators to add to the existing list.
public
getOperators() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>getSecurityPolicy()
public
getSecurityPolicy() : SecurityPolicyInterface
Return values
SecurityPolicyInterfacegetTests()
Returns a list of tests to add to the existing list.
public
getTests() : array<string|int, TwigTest>
Return values
array<string|int, TwigTest>getTokenParsers()
Returns the token parser instances to add to the existing list.
public
getTokenParsers() : array<string|int, TokenParserInterface>
Return values
array<string|int, TokenParserInterface>isSandboxed()
public
isSandboxed([Source|null $source = null ]) : bool
Parameters
- $source : Source|null = null
Return values
boolisSandboxedGlobally()
public
isSandboxedGlobally() : bool
Return values
boolsetSecurityPolicy()
public
setSecurityPolicy(SecurityPolicyInterface $policy) : void
Parameters
- $policy : SecurityPolicyInterface
ensureToStringAllowedForArray()
private
ensureToStringAllowedForArray(array<string|int, mixed> $obj, int $lineno, Source|null $source[, array<string|int, mixed> &$stack = [] ]) : void
Parameters
- $obj : array<string|int, mixed>
- $lineno : int
- $source : Source|null
- $stack : array<string|int, mixed> = []
isSourceSandboxed()
private
isSourceSandboxed(Source|null $source) : bool
Parameters
- $source : Source|null