ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAssLacAbstractManufacturer Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilAssLacAbstractManufacturer:
+ Collaboration diagram for ilAssLacAbstractManufacturer:

Public Member Functions

 match (string $subject)
 Matches a delivered string with a the pattern returned by getPattern implemented in the explicit Manufacturer. More...
 
- Public Member Functions inherited from ilAssLacManufacturerInterface
 manufacture (string $attribute)
 Create a new specific Composite object which is representing the delivered Attribute. More...
 
 getPattern ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilAssLacManufacturerInterface
static _getInstance ()
 Get an singleton of the manufacturer. More...
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class AbstractManufacturer

Date: 26.03.13 Time: 15:13

Author
Thomas Joußen tjous.nosp@m.sen@.nosp@m.datab.nosp@m.ay.d.nosp@m.e

Definition at line 26 of file ilAssLacAbstractManufacturer.php.

Member Function Documentation

◆ match()

ilAssLacAbstractManufacturer::match ( string  $subject)

Matches a delivered string with a the pattern returned by getPattern implemented in the explicit Manufacturer.

Parameters
string$subject
Returns
array
Exceptions
ilAssLacUnableToParseCondition
See also
ManufacturerInterface::getPattern()

Implements ilAssLacManufacturerInterface.

Definition at line 35 of file ilAssLacAbstractManufacturer.php.

References ilAssLacManufacturerInterface\getPattern().

35  : 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  }
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: