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

Represents a template test. More...

+ Collaboration diagram for Twig_SimpleTest:

Public Member Functions

 __construct ($name, $callable, array $options=array())
 
 getName ()
 
 getCallable ()
 
 getNodeClass ()
 
 isVariadic ()
 
 isDeprecated ()
 
 getDeprecatedVersion ()
 
 getAlternative ()
 

Protected Attributes

 $name
 
 $callable
 
 $options
 

Detailed Description

Represents a template test.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 19 of file SimpleTest.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_SimpleTest::__construct (   $name,
  $callable,
array  $options = array() 
)

Definition at line 25 of file SimpleTest.php.

References $callable, $name, $options, and array.

26  {
27  $this->name = $name;
28  $this->callable = $callable;
29  $this->options = array_merge(array(
30  'is_variadic' => false,
31  'node_class' => 'Twig_Node_Expression_Test',
32  'deprecated' => false,
33  'alternative' => null,
34  ), $options);
35  }
Create styles array
The data for the language used.

Member Function Documentation

◆ getAlternative()

Twig_SimpleTest::getAlternative ( )

Definition at line 67 of file SimpleTest.php.

68  {
69  return $this->options['alternative'];
70  }

◆ getCallable()

Twig_SimpleTest::getCallable ( )

Definition at line 42 of file SimpleTest.php.

References $callable.

43  {
44  return $this->callable;
45  }

◆ getDeprecatedVersion()

Twig_SimpleTest::getDeprecatedVersion ( )

Definition at line 62 of file SimpleTest.php.

63  {
64  return $this->options['deprecated'];
65  }

◆ getName()

Twig_SimpleTest::getName ( )

Definition at line 37 of file SimpleTest.php.

References $name.

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

◆ getNodeClass()

Twig_SimpleTest::getNodeClass ( )

Definition at line 47 of file SimpleTest.php.

48  {
49  return $this->options['node_class'];
50  }

◆ isDeprecated()

Twig_SimpleTest::isDeprecated ( )

Definition at line 57 of file SimpleTest.php.

58  {
59  return (bool) $this->options['deprecated'];
60  }

◆ isVariadic()

Twig_SimpleTest::isVariadic ( )

Definition at line 52 of file SimpleTest.php.

53  {
54  return $this->options['is_variadic'];
55  }

Field Documentation

◆ $callable

Twig_SimpleTest::$callable
protected

Definition at line 22 of file SimpleTest.php.

Referenced by __construct(), and getCallable().

◆ $name

Twig_SimpleTest::$name
protected

Definition at line 21 of file SimpleTest.php.

Referenced by __construct(), and getName().

◆ $options

Twig_SimpleTest::$options
protected

Definition at line 23 of file SimpleTest.php.

Referenced by __construct().


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