ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
ilAssLacResultOfAnswerOfQuestionExpression Class Reference

Class ResultOfAnswerOfQuestion for the expression Qn[m]. More...

+ Inheritance diagram for ilAssLacResultOfAnswerOfQuestionExpression:
+ Collaboration diagram for ilAssLacResultOfAnswerOfQuestionExpression:

Public Member Functions

 getPattern ()
 Get the Pattern to match relevant informations for an Expression. More...
 
 getQuestionIndex ()
 
 getAnswerIndex ()
 
 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...
 

Static Public Attributes

static $pattern = "/Q[0-9]+\\[[0-9]+\\]/"
 
static $identifier = "Qn[m]"
 

Protected Member Functions

 setMatches ($matches)
 Sets the result of the parsed value by a specific expression pattern. More...
 
- Protected Member Functions inherited from ilAssLacAbstractExpression
 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
 
 $answer_index
 

Additional Inherited Members

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

Detailed Description

Class ResultOfAnswerOfQuestion for the expression Qn[m].

Date: 25.03.13 Time: 16:40

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

Definition at line 13 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

Member Function Documentation

◆ getAnswerIndex()

ilAssLacResultOfAnswerOfQuestionExpression::getAnswerIndex ( )

◆ getDescription()

ilAssLacResultOfAnswerOfQuestionExpression::getDescription ( )

Get a human readable description of the Composite element.

Returns
string

Implements ilAssLacCompositeInterface.

Definition at line 98 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

99  {
100  return "Frage " . $this->question_index . " mit Anwort " . $this->answer_index . " beantwortet ";
101  }

◆ getPattern()

ilAssLacResultOfAnswerOfQuestionExpression::getPattern ( )

Get the Pattern to match relevant informations for an Expression.

Returns
string

Definition at line 51 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

52  {
53  return '/(\d+)\[(\d+)\]/';
54  }

◆ getQuestionIndex()

ilAssLacResultOfAnswerOfQuestionExpression::getQuestionIndex ( )

◆ getValue()

ilAssLacResultOfAnswerOfQuestionExpression::getValue ( )

Get the value of this Expression.

Returns
string

Implements ilAssLacExpressionInterface.

Definition at line 89 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

90  {
91  return "Q" . $this->question_index . '[' . $this->answer_index . ']';
92  }

◆ setMatches()

ilAssLacResultOfAnswerOfQuestionExpression::setMatches (   $matches)
protected

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

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

Definition at line 63 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

64  {
65  $this->question_index = $matches[1][0];
66  $this->answer_index = $matches[2][0];
67  }

Field Documentation

◆ $answer_index

ilAssLacResultOfAnswerOfQuestionExpression::$answer_index
protected

Definition at line 45 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

Referenced by getAnswerIndex().

◆ $identifier

ilAssLacResultOfAnswerOfQuestionExpression::$identifier = "Qn[m]"
static

◆ $pattern

ilAssLacResultOfAnswerOfQuestionExpression::$pattern = "/Q[0-9]+\\[[0-9]+\\]/"
static

◆ $question_index

ilAssLacResultOfAnswerOfQuestionExpression::$question_index
protected

Definition at line 38 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

Referenced by getQuestionIndex().


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