ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAssLacAbstractManufacturer.php
Go to the documentation of this file.
1<?php
2
27{
35 public function match(string $subject): array
36 {
37 $matches = [];
38 $num_matches = preg_match_all($this->getPattern(), $subject, $matches);
39
40 if ($num_matches == 0) {
41 throw new ilAssLacUnableToParseCondition($subject);
42 }
43 // Trims each element in the matches array
44 $matches = array_map(function ($element) {
45 return trim($element);
46 }, $matches[0]);
47
48 return $matches;
49 }
50}
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...