ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 99 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

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

◆ getPattern()

ilAssLacResultOfAnswerOfQuestionExpression::getPattern ( )

Get the Pattern to match relevant informations for an Expression.

Returns
string

Definition at line 52 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

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

◆ getQuestionIndex()

ilAssLacResultOfAnswerOfQuestionExpression::getQuestionIndex ( )

◆ getValue()

ilAssLacResultOfAnswerOfQuestionExpression::getValue ( )

Get the value of this Expression.

Returns
string

Implements ilAssLacExpressionInterface.

Definition at line 90 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

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

◆ 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 64 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

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

Field Documentation

◆ $answer_index

ilAssLacResultOfAnswerOfQuestionExpression::$answer_index
protected

Definition at line 46 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 39 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

Referenced by getQuestionIndex().


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