ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
20 protected function getPattern()
21 {
22 return '/-?[0-9\.]+/';
23 }
24
30 public function parseValue($value)
31 {
32 $result = array();
33 preg_match_all($this->getPattern(), $value, $result);
34 $this->setMatches($result);
35 }
36
44 abstract protected function setMatches($matches);
45}
$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.