Represents a template function.
More...
Represents a template function.
- Author
- Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
Definition at line 19 of file SimpleFunction.php.
◆ __construct()
Twig_SimpleFunction::__construct |
( |
|
$name, |
|
|
|
$callable, |
|
|
array |
$options = array() |
|
) |
| |
Definition at line 26 of file SimpleFunction.php.
References $callable, $name, $options, and array.
30 $this->options = array_merge(
array(
31 'needs_environment' =>
false,
32 'needs_context' =>
false,
33 'is_variadic' =>
false,
35 'is_safe_callback' => null,
36 'node_class' =>
'Twig_Node_Expression_Function',
37 'deprecated' =>
false,
38 'alternative' => null,
Create styles array
The data for the language used.
◆ getAlternative()
Twig_SimpleFunction::getAlternative |
( |
| ) |
|
◆ getArguments()
Twig_SimpleFunction::getArguments |
( |
| ) |
|
◆ getCallable()
Twig_SimpleFunction::getCallable |
( |
| ) |
|
◆ getDeprecatedVersion()
Twig_SimpleFunction::getDeprecatedVersion |
( |
| ) |
|
◆ getName()
Twig_SimpleFunction::getName |
( |
| ) |
|
◆ getNodeClass()
Twig_SimpleFunction::getNodeClass |
( |
| ) |
|
◆ getSafe()
Twig_SimpleFunction::getSafe |
( |
Twig_Node |
$functionArgs | ) |
|
Definition at line 77 of file SimpleFunction.php.
References array.
79 if (null !== $this->options[
'is_safe']) {
80 return $this->options[
'is_safe'];
83 if (null !== $this->options[
'is_safe_callback']) {
84 return call_user_func($this->options[
'is_safe_callback'], $functionArgs);
Create styles array
The data for the language used.
◆ isDeprecated()
Twig_SimpleFunction::isDeprecated |
( |
| ) |
|
◆ isVariadic()
Twig_SimpleFunction::isVariadic |
( |
| ) |
|
◆ needsContext()
Twig_SimpleFunction::needsContext |
( |
| ) |
|
◆ needsEnvironment()
Twig_SimpleFunction::needsEnvironment |
( |
| ) |
|
◆ setArguments()
Twig_SimpleFunction::setArguments |
( |
|
$arguments | ) |
|
◆ $arguments
Twig_SimpleFunction::$arguments = array() |
|
protected |
◆ $callable
Twig_SimpleFunction::$callable |
|
protected |
◆ $name
Twig_SimpleFunction::$name |
|
protected |
◆ $options
Twig_SimpleFunction::$options |
|
protected |
The documentation for this class was generated from the following file: