ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAssLacResultOfAnswerOfCurrentQuestionExpression Class Reference

Class ResultOfAnswerOfCurrentQuestion for the expression R[m]. More...

+ Inheritance diagram for ilAssLacResultOfAnswerOfCurrentQuestionExpression:
+ Collaboration diagram for ilAssLacResultOfAnswerOfCurrentQuestionExpression:

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 = "/R\\[[0-9]+\\]/"
 
static $identifier = "R[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

 $answer_index
 

Additional Inherited Members

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

Detailed Description

Class ResultOfAnswerOfCurrentQuestion for the expression R[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 ilAssLacResultOfAnswerOfCurrentQuestionExpression.php.

Member Function Documentation

◆ getAnswerIndex()

ilAssLacResultOfAnswerOfCurrentQuestionExpression::getAnswerIndex ( )

◆ getDescription()

ilAssLacResultOfAnswerOfCurrentQuestionExpression::getDescription ( )

Get a human readable description of the Composite element.

Returns
string

Implements ilAssLacCompositeInterface.

Definition at line 90 of file ilAssLacResultOfAnswerOfCurrentQuestionExpression.php.

91  {
92  return "Aktuelle Frage mit Anwort " . $this->answer_index . " beantwortet ";
93  }

◆ getPattern()

ilAssLacResultOfAnswerOfCurrentQuestionExpression::getPattern ( )

Get the Pattern to match relevant informations for an Expression.

Returns
string

Definition at line 44 of file ilAssLacResultOfAnswerOfCurrentQuestionExpression.php.

45  {
46  return '/\[(\d+)\]/';
47  }

◆ getQuestionIndex()

ilAssLacResultOfAnswerOfCurrentQuestionExpression::getQuestionIndex ( )
Returns
int

Implements ilAssLacQuestionExpressionInterface.

Definition at line 64 of file ilAssLacResultOfAnswerOfCurrentQuestionExpression.php.

65  {
66  return null;
67  }

◆ getValue()

ilAssLacResultOfAnswerOfCurrentQuestionExpression::getValue ( )

Get the value of this Expression.

Returns
string

Implements ilAssLacExpressionInterface.

Definition at line 81 of file ilAssLacResultOfAnswerOfCurrentQuestionExpression.php.

82  {
83  return 'R[' . $this->answer_index . ']';
84  }

◆ setMatches()

ilAssLacResultOfAnswerOfCurrentQuestionExpression::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 56 of file ilAssLacResultOfAnswerOfCurrentQuestionExpression.php.

57  {
58  $this->answer_index = $matches[1][0];
59  }

Field Documentation

◆ $answer_index

ilAssLacResultOfAnswerOfCurrentQuestionExpression::$answer_index
protected

◆ $identifier

ilAssLacResultOfAnswerOfCurrentQuestionExpression::$identifier = "R[m]"
static

◆ $pattern

ilAssLacResultOfAnswerOfCurrentQuestionExpression::$pattern = "/R\\[[0-9]+\\]/"
static

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