Documentation

Twig_SimpleTest extends TwigTest
in package

Represents a template test.

Tags
deprecated

since Twig 2.7, use "Twig\TwigTest" instead

Table of Contents

$arguments  : mixed
$callable  : mixed
$name  : mixed
$options  : mixed
__construct()  : mixed
Creates a template test.
getAlternative()  : mixed
getArguments()  : mixed
getCallable()  : callable|null
Returns the callable to execute for this test.
getDeprecatedVersion()  : mixed
getName()  : mixed
getNodeClass()  : mixed
hasOneMandatoryArgument()  : bool
isDeprecated()  : mixed
isVariadic()  : mixed
setArguments()  : mixed

Properties

$arguments

private mixed $arguments = []

Methods

__construct()

Creates a template test.

public __construct(string $name[, callable|null $callable = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$name : string

Name of this test

$callable : callable|null = null

A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation.

$options : array<string|int, mixed> = []

Options array

Return values
mixed

getAlternative()

public getAlternative() : mixed
Return values
mixed

getArguments()

public getArguments() : mixed
Return values
mixed

getCallable()

Returns the callable to execute for this test.

public getCallable() : callable|null
Return values
callable|null

getDeprecatedVersion()

public getDeprecatedVersion() : mixed
Return values
mixed

getName()

public getName() : mixed
Return values
mixed

getNodeClass()

public getNodeClass() : mixed
Return values
mixed

hasOneMandatoryArgument()

public hasOneMandatoryArgument() : bool
Return values
bool

isDeprecated()

public isDeprecated() : mixed
Return values
mixed

isVariadic()

public isVariadic() : mixed
Return values
mixed

setArguments()

public setArguments(mixed $arguments) : mixed
Parameters
$arguments : mixed
Return values
mixed

Search results