ILIAS  release_8 Revision v8.24
ilAssLacAbstractManufacturer.php
Go to the documentation of this file.
1<?php
2
27{
35 public function match(string $subject): array
36 {
37 $matches = array();
38 $num_matches = preg_match_all($this->getPattern(), $subject, $matches);
39
40 if ($num_matches == 0) {
41 require_once 'Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacUnableToParseCondition.php';
42 throw new ilAssLacUnableToParseCondition($subject);
43 }
44 // Trims each element in the matches array
45 $matches = array_map(function ($element) {
46 return trim($element);
47 }, $matches[0]);
48
49 return $matches;
50 }
51}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
match(string $subject)
Matches a delivered string with a the pattern returned by getPattern implemented in the explicit Manu...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...