ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilAssLacAbstractManufacturer.php
Go to the documentation of this file.
1 <?php
2 
3 include_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...
Create styles array
The data for the language used.