ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
ilBPMN2ElementLoader Class Reference

Class ilBPMN2ElementLoader. More...

+ Collaboration diagram for ilBPMN2ElementLoader:

Public Member Functions

 __construct ($bpmn2_array)
 ilBPMN2ElementLoader constructor. More...
 
 load ($element_name)
 

Protected Attributes

 $bpmn2_array
 

Detailed Description

Class ilBPMN2ElementLoader.

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

/

Definition at line 14 of file class.ilBPMN2ElementLoader.php.

Constructor & Destructor Documentation

◆ __construct()

ilBPMN2ElementLoader::__construct (   $bpmn2_array)

ilBPMN2ElementLoader constructor.

Parameters
$bpmn2_array

Definition at line 24 of file class.ilBPMN2ElementLoader.php.

References $bpmn2_array.

25  {
26  $this->bpmn2_array = $bpmn2_array;
27  }

Member Function Documentation

◆ load()

ilBPMN2ElementLoader::load (   $element_name)
Parameters
string$element_name
Returns
mixed

Definition at line 34 of file class.ilBPMN2ElementLoader.php.

35  {
36  preg_match( '/[A-Z]/', $element_name, $matches, PREG_OFFSET_CAPTURE );
37  $type = strtolower(substr($element_name, @$matches[0][1]));
38  if ($type == 'basedgateway')
39  {
40  // Fixing a violation of the standards naming convention by the standard here.
41  $type = 'gateway';
42  }
43 
44  if ($type == 'objectreference')
45  {
46  // Fixing a violation of the standards naming convention by the standard here.
47  $type = 'object';
48  }
49 
50  require_once './Services/WorkflowEngine/classes/parser/elements/' . $type . '/class.il' . ucfirst($element_name) . 'Element.php';
51  $classname = 'il'.ucfirst($element_name).'Element';
52  $instance = new $classname;
53  $instance->setBPMN2Array($this->bpmn2_array);
54 
55  return $instance;
56  }

Field Documentation

◆ $bpmn2_array

ilBPMN2ElementLoader::$bpmn2_array
protected

Definition at line 17 of file class.ilBPMN2ElementLoader.php.

Referenced by __construct().


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