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

Represents a function template test. More...

+ Inheritance diagram for Twig_Test_Function:
+ Collaboration diagram for Twig_Test_Function:

Public Member Functions

 __construct ($function, array $options=array())
 
 compile ()
 Compiles a test. More...
 
- Public Member Functions inherited from Twig_Test
 __construct (array $options=array())
 
 getCallable ()
 

Protected Attributes

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

Detailed Description

Represents a function template test.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
Deprecated:
since 1.12 (to be removed in 2.0)

Definition at line 21 of file Function.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 25 of file Function.php.

References $function, and Twig_Test\$options.

26  {
27  $options['callable'] = $function;
28 
29  parent::__construct($options);
30 
31  $this->function = $function;
32  }
$options
Definition: Test.php:23

Member Function Documentation

◆ compile()

Twig_Test_Function::compile ( )

Compiles a test.

Returns
string The PHP code for the test

Implements Twig_TestInterface.

Definition at line 34 of file Function.php.

References $function.

35  {
36  return $this->function;
37  }

Field Documentation

◆ $function

Twig_Test_Function::$function
protected

Definition at line 23 of file Function.php.

Referenced by __construct(), and compile().


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