ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Function_Function Class Reference

Represents a function template function. More...

+ Inheritance diagram for Twig_Function_Function:
+ Collaboration diagram for Twig_Function_Function:

Public Member Functions

 __construct ($function, array $options=array())
 
 compile ()
 Compiles a function. More...
 
- Public Member Functions inherited from Twig_Function
 __construct (array $options=array())
 
 setArguments ($arguments)
 
 getArguments ()
 
 needsEnvironment ()
 
 needsContext ()
 
 getSafe (Twig_Node $functionArgs)
 
 getCallable ()
 

Protected Attributes

 $function
 
- Protected Attributes inherited from Twig_Function
 $options
 
 $arguments = array()
 

Detailed Description

Represents a function template function.

Use Twig_SimpleFunction instead.

Author
Arnaud Le Blanc arnau.nosp@m.d.lb.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Deprecated:
since 1.12 (to be removed in 2.0)

Definition at line 24 of file Function.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Function_Function::__construct (   $function,
array  $options = array() 
)

Definition at line 28 of file Function.php.

References $function, and Twig_Function\$options.

29  {
30  $options['callable'] = $function;
31 
32  parent::__construct($options);
33 
34  $this->function = $function;
35  }

Member Function Documentation

◆ compile()

Twig_Function_Function::compile ( )

Compiles a function.

Returns
string The PHP code for the function

Implements Twig_FunctionInterface.

Definition at line 37 of file Function.php.

References $function.

38  {
39  return $this->function;
40  }

Field Documentation

◆ $function

Twig_Function_Function::$function
protected

Definition at line 26 of file Function.php.

Referenced by __construct(), and compile().


The documentation for this class was generated from the following file: