ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAssLacAbstractManufacturer.php
Go to the documentation of this file.
1<?php
2
3include_once "Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Factory/ilAssLacManufacturerInterface.php";
4
13
23 public function match($subject)
24 {
25 $matches = array();
26 $num_matches = preg_match_all($this->getPattern(), $subject, $matches);
27
28 if($num_matches == 0)
29 {
30 require_once 'Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacUnableToParseCondition.php';
31 throw new ilAssLacUnableToParseCondition($subject);
32 }
33 // Trims each element in the matches array
34 $matches = array_map(function($element){
35 return trim($element);
36 }, $matches[0]);
37
38 return $matches;
39 }
40}
match($subject)
Matches a delivered string with a the pattern returned by getPattern implemented in the explicit Manu...