Documentation

AbstractTwigCallable
in package
implements TwigCallableInterface

AbstractYes
Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Interfaces

TwigCallableInterface

Properties

$options  : mixed
$arguments  : mixed
$callable  : mixed
$dynamicName  : mixed
$name  : mixed

Methods

__construct()  : mixed
__toString()  : string
getAlternative()  : string|null
getArguments()  : array<string|int, mixed>
getCallable()  : callable|array{class-string, string}|null
getDeprecatedVersion()  : string
getDeprecatingPackage()  : string
getDynamicName()  : string
getMinimalNumberOfRequiredArguments()  : int
getName()  : string
getNodeClass()  : string
isDeprecated()  : bool
isVariadic()  : bool
needsCharset()  : bool
needsContext()  : bool
needsEnvironment()  : bool
setArguments()  : void
triggerDeprecation()  : void
withDynamicArguments()  : static

Properties

Methods

__construct()

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

getAlternative()

public getAlternative() : string|null

since Twig 3.15

Return values
string|null

getArguments()

public getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCallable()

public getCallable() : callable|array{class-string, string}|null
Return values
callable|array{class-string, string}|null

getDeprecatedVersion()

public getDeprecatedVersion() : string

since Twig 3.15

Return values
string

getDeprecatingPackage()

public getDeprecatingPackage() : string

since Twig 3.15

Return values
string

getMinimalNumberOfRequiredArguments()

public getMinimalNumberOfRequiredArguments() : int
Return values
int

setArguments()

public setArguments(array<string|int, mixed> $arguments) : void

since Twig 3.12, use withDynamicArguments() instead

Parameters
$arguments : array<string|int, mixed>

triggerDeprecation()

public triggerDeprecation([string|null $file = null ][, int|null $line = null ]) : void
Parameters
$file : string|null = null
$line : int|null = null

withDynamicArguments()

public withDynamicArguments(string $name, string $dynamicName, array<string|int, mixed> $arguments) : static
Parameters
$name : string
$dynamicName : string
$arguments : array<string|int, mixed>
Return values
static

        
On this page

Search results