Represents a template filter.
More...
Represents a template filter.
- Author
- Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
Definition at line 19 of file SimpleFilter.php.
◆ __construct()
Twig_SimpleFilter::__construct |
( |
|
$name, |
|
|
|
$callable, |
|
|
array |
$options = array() |
|
) |
| |
Definition at line 26 of file SimpleFilter.php.
References $callable, $name, and $options.
30 $this->options = array_merge(array(
31 'needs_environment' =>
false,
32 'needs_context' =>
false,
33 'is_variadic' =>
false,
35 'is_safe_callback' => null,
37 'preserves_safety' => null,
38 'node_class' =>
'Twig_Node_Expression_Filter',
39 'deprecated' =>
false,
40 'alternative' => null,
◆ getAlternative()
Twig_SimpleFilter::getAlternative |
( |
| ) |
|
◆ getArguments()
Twig_SimpleFilter::getArguments |
( |
| ) |
|
◆ getCallable()
Twig_SimpleFilter::getCallable |
( |
| ) |
|
◆ getDeprecatedVersion()
Twig_SimpleFilter::getDeprecatedVersion |
( |
| ) |
|
◆ getName()
Twig_SimpleFilter::getName |
( |
| ) |
|
◆ getNodeClass()
Twig_SimpleFilter::getNodeClass |
( |
| ) |
|
◆ getPreEscape()
Twig_SimpleFilter::getPreEscape |
( |
| ) |
|
◆ getPreservesSafety()
Twig_SimpleFilter::getPreservesSafety |
( |
| ) |
|
Definition at line 90 of file SimpleFilter.php.
92 return $this->options[
'preserves_safety'];
◆ getSafe()
Twig_SimpleFilter::getSafe |
( |
Twig_Node |
$filterArgs | ) |
|
Definition at line 79 of file SimpleFilter.php.
81 if (null !== $this->options[
'is_safe']) {
82 return $this->options[
'is_safe'];
85 if (null !== $this->options[
'is_safe_callback']) {
86 return call_user_func($this->options[
'is_safe_callback'], $filterArgs);
◆ isDeprecated()
Twig_SimpleFilter::isDeprecated |
( |
| ) |
|
◆ isVariadic()
Twig_SimpleFilter::isVariadic |
( |
| ) |
|
◆ needsContext()
Twig_SimpleFilter::needsContext |
( |
| ) |
|
Definition at line 74 of file SimpleFilter.php.
76 return $this->options[
'needs_context'];
◆ needsEnvironment()
Twig_SimpleFilter::needsEnvironment |
( |
| ) |
|
Definition at line 69 of file SimpleFilter.php.
71 return $this->options[
'needs_environment'];
◆ setArguments()
Twig_SimpleFilter::setArguments |
( |
|
$arguments | ) |
|
◆ $arguments
Twig_SimpleFilter::$arguments = array() |
|
protected |
◆ $callable
Twig_SimpleFilter::$callable |
|
protected |
◆ $name
◆ $options
Twig_SimpleFilter::$options |
|
protected |
The documentation for this class was generated from the following file: