Twig_Extension_Sandbox

Extends\Twig\Extension\SandboxExtension

package

Default

Methods

__construct

__construct(\Twig\Sandbox\SecurityPolicyInterface $policy, $sandboxed = false)
inherited

Arguments

$sandboxed

checkMethodAllowed

checkMethodAllowed( $obj, $method)
inherited

Arguments

$obj

$method

checkPropertyAllowed

checkPropertyAllowed( $obj, $method)
inherited

Arguments

$obj

$method

checkSecurity

checkSecurity( $tags, $filters, $functions)
inherited

Arguments

$tags

$filters

$functions

disableSandbox

disableSandbox()
inherited

enableSandbox

enableSandbox()
inherited

ensureToStringAllowed

ensureToStringAllowed( $obj)
inherited

Arguments

$obj

Returns a list of filters to add to the existing list.

getFilters(): array<mixed,\Twig\TwigFilter>
inherited

Response

array<mixed,\Twig\TwigFilter>

Returns a list of functions to add to the existing list.

getFunctions(): array<mixed,\Twig\TwigFunction>
inherited

Response

array<mixed,\Twig\TwigFunction>

Returns a list of global variables to add to the existing list.

getGlobals(): array
inherited
deprecated

since 1.23 (to be removed in 2.0), implement \Twig_Extension_GlobalsInterface instead

Response

array

An array of global variables

Returns the name of the extension.

getName(): string
inherited
deprecated

since 1.26 (to be removed in 2.0), not used anymore internally

Response

string

The extension name

Returns the node visitor instances to add to the existing list.

getNodeVisitors(): array<mixed,\Twig\NodeVisitor\NodeVisitorInterface>
inherited

Returns a list of operators to add to the existing list.

getOperators(): \Twig\Extension\array<array>
inherited

Response

\Twig\Extension\array

First array of unary operators, second array of binary operators

getSecurityPolicy

getSecurityPolicy()
inherited

Returns a list of tests to add to the existing list.

getTests(): array<mixed,\Twig\TwigTest>
inherited

Response

array<mixed,\Twig\TwigTest>

Returns the token parser instances to add to the existing list.

getTokenParsers(): array<mixed,\Twig\TokenParser\TokenParserInterface>
inherited

Initializes the runtime environment.

initRuntime(\Twig\Environment $environment)
inherited

This is where you can load some file that contains filter functions for instance.

deprecated

since 1.23 (to be removed in 2.0), implement \Twig_Extension_InitRuntimeInterface instead

Arguments

$environment

\Twig\Environment

isSandboxed

isSandboxed()
inherited

isSandboxedGlobally

isSandboxedGlobally()
inherited

setSecurityPolicy

setSecurityPolicy(\Twig\Sandbox\SecurityPolicyInterface $policy)
inherited

Properties

sandboxedGlobally

sandboxedGlobally :
inherited

Type(s)

sandboxed

sandboxed :
inherited

Type(s)

policy

policy :
inherited

Type(s)