TwigTest
in package
FinalYes
Represents a template test.
Tags
Table of Contents
Properties
- $arguments : mixed
- $callable : mixed
- $name : mixed
- $options : mixed
Methods
- __construct() : mixed
- getAlternative() : string|null
- getArguments() : array<string|int, mixed>
- getCallable() : callable|array{: class-string, : string}|null
- Returns the callable to execute for this test.
- getDeprecatedVersion() : string
- getName() : string
- getNodeClass() : string
- hasOneMandatoryArgument() : bool
- isDeprecated() : bool
- isVariadic() : bool
- setArguments() : void
Properties
$arguments
private
mixed
$arguments
= []
$callable
private
mixed
$callable
$name
private
mixed
$name
$options
private
mixed
$options
Methods
__construct()
public
__construct(string $name[, callable|array{: class-string, : string}|null $callable = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $name : string
- $callable : callable|array{: class-string, : string}|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> = []
getAlternative()
public
getAlternative() : string|null
Return values
string|nullgetArguments()
public
getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed>getCallable()
Returns the callable to execute for this test.
public
getCallable() : callable|array{: class-string, : string}|null
Return values
callable|array{: class-string, : string}|nullgetDeprecatedVersion()
public
getDeprecatedVersion() : string
Return values
stringgetName()
public
getName() : string
Return values
stringgetNodeClass()
public
getNodeClass() : string
Return values
stringhasOneMandatoryArgument()
public
hasOneMandatoryArgument() : bool
Return values
boolisDeprecated()
public
isDeprecated() : bool
Return values
boolisVariadic()
public
isVariadic() : bool
Return values
boolsetArguments()
public
setArguments(array<string|int, mixed> $arguments) : void
Parameters
- $arguments : array<string|int, mixed>