ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAssLacAbstractManufacturer Class Reference

Class AbstractManufacturer. More...

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

Public Member Functions

 match ($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 ($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

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 12 of file ilAssLacAbstractManufacturer.php.

Member Function Documentation

◆ match()

ilAssLacAbstractManufacturer::match (   $subject)

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

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

Implements ilAssLacManufacturerInterface.

Definition at line 24 of file ilAssLacAbstractManufacturer.php.

References ilAssLacManufacturerInterface\getPattern().

25  {
26  $matches = array();
27  $num_matches = preg_match_all($this->getPattern(), $subject, $matches);
28 
29  if ($num_matches == 0) {
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  }
+ Here is the call graph for this function:

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