ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 match (string $subject)
 Matches a delivered string with a the pattern returned by getPattern implemented in the explicit Manufacturer. More...
 

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.

35 : 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 }

References ilAssLacManufacturerInterface\getPattern().

+ Here is the call graph for this function:

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