ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilAssLacAbstractExpression.php
Go to the documentation of this file.
1<?php
2
3include_once 'Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/ilAssLacAbstractComposite.php';
4include_once 'Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Expressions/ilAssLacExpressionInterface.php';
5
14{
15
16
21 protected function getPattern()
22 {
23 return '/-?[0-9\.]+/';
24 }
25
31 public function parseValue($value)
32 {
33 $result = array();
34 preg_match_all($this->getPattern(), $value, $result);
35 $this->setMatches($result);
36 }
37
45 abstract protected function setMatches($matches);
46}
$result
An exception for terminatinating execution or to throw for unit testing.
setMatches($matches)
Sets the result of the parsed value by a specific expression pattern.
parseValue($value)
Parses the delivered Value and sets the relevant information for an Expression as attributes.
getPattern()
Get the Pattern to match relevant informations for an Expression.