ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAssLacAnswerOfQuestionExpression Class Reference

Class AnswerOfQuestionExpression for the expression Qn. More...

+ Inheritance diagram for ilAssLacAnswerOfQuestionExpression:
+ Collaboration diagram for ilAssLacAnswerOfQuestionExpression:

Public Member Functions

 getQuestionIndex ()
 Get the question index. More...
 
 getValue ()
 Get the value of this Expression. More...
 
 getDescription ()
 Get a human readable description of the Composite element. More...
 
- Public Member Functions inherited from ilAssLacAbstractExpression
 parseValue ($value)
 Parses the delivered Value and sets the relevant information for an Expression as attributes. More...
 
- Public Member Functions inherited from ilAssLacAbstractComposite
 addNode (ilAssLacCompositeInterface $node)
 Adds an ilAssLacCompositeInterface object to the node array which represents the condition tree structure. More...
 
 describe ()
 Describes a Composite tree Structure as human readable string. More...
 
 addNode (ilAssLacCompositeInterface $node)
 Adds an CompositeInterface object to the node array which represents the condition tree structure. More...
 
 describe ()
 Describes a Composite tree Structure as human readable string. More...
 
 getDescription ()
 Get a human readable description of the Composite element. More...
 
 getValue ()
 Get the value of this Expression. More...
 
 parseValue ($value)
 Parses the delivered Value and sets the relevant information for an Expression as attributes. More...
 
 getQuestionIndex ()
 

Static Public Attributes

static $pattern = '/(Q\d+)(?=\=|<|>|\s|$)/'
 
static $identifier = "Qn"
 

Protected Member Functions

 setMatches ($matches)
 Sets the result of the parsed value by a specific expression pattern. More...
 
 getPattern ()
 Get the Pattern to match relevant informations for an Expression. More...
 
 getPattern ()
 Get the Pattern to match relevant informations for an Expression. More...
 
 setMatches ($matches)
 Sets the result of the parsed value by a specific expression pattern. More...
 

Protected Attributes

 $question_index
 

Additional Inherited Members

- Data Fields inherited from ilAssLacAbstractComposite
 $nodes = array()
 

Detailed Description

Class AnswerOfQuestionExpression for the expression Qn.

Date: 25.03.13 Time: 16:39

Author
Thomas Joußen tjous.nosp@m.sen@.nosp@m.datab.nosp@m.ay.d.nosp@m.e

Definition at line 13 of file ilAssLacAnswerOfQuestionExpression.php.

Member Function Documentation

◆ getDescription()

ilAssLacAnswerOfQuestionExpression::getDescription ( )

Get a human readable description of the Composite element.

Returns
string

Implements ilAssLacCompositeInterface.

Definition at line 79 of file ilAssLacAnswerOfQuestionExpression.php.

80 {
81 return "Frage " . $this->question_index . " ";
82 }

◆ getPattern()

ilAssLacAnswerOfQuestionExpression::getPattern ( )
protected

Get the Pattern to match relevant informations for an Expression.

Returns
string

Reimplemented from ilAssLacAbstractExpression.

Definition at line 88 of file ilAssLacAnswerOfQuestionExpression.php.

89 {
90 return '/-?[0-9]+/';
91 }

◆ getQuestionIndex()

ilAssLacAnswerOfQuestionExpression::getQuestionIndex ( )

Get the question index.

Returns
int

Implements ilAssLacQuestionExpressionInterface.

Definition at line 61 of file ilAssLacAnswerOfQuestionExpression.php.

References $question_index.

◆ getValue()

ilAssLacAnswerOfQuestionExpression::getValue ( )

Get the value of this Expression.

Returns
string

Implements ilAssLacExpressionInterface.

Definition at line 70 of file ilAssLacAnswerOfQuestionExpression.php.

71 {
72 return "Q" . $this->question_index;
73 }

References $question_index.

◆ setMatches()

ilAssLacAnswerOfQuestionExpression::setMatches (   $matches)
protected

Sets the result of the parsed value by a specific expression pattern.

See also
ExpressionInterface::parseValue()
ExpressionInterface::getPattern()
Parameters
array$matches

Reimplemented from ilAssLacAbstractExpression.

Definition at line 51 of file ilAssLacAnswerOfQuestionExpression.php.

52 {
53 $this->question_index = $matches[0][0];
54 }

Field Documentation

◆ $identifier

ilAssLacAnswerOfQuestionExpression::$identifier = "Qn"
static

Definition at line 35 of file ilAssLacAnswerOfQuestionExpression.php.

◆ $pattern

ilAssLacAnswerOfQuestionExpression::$pattern = '/(Q\d+)(?=\=|<|>|\s|$)/'
static

◆ $question_index

ilAssLacAnswerOfQuestionExpression::$question_index
protected

Definition at line 42 of file ilAssLacAnswerOfQuestionExpression.php.

Referenced by getQuestionIndex(), and getValue().


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