ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilExtractorFactory.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
12 {
18  public static function getExtractorByEventDescriptor($component)
19  {
20  require_once './Services/WorkflowEngine/classes/extractors/class.ilExtractedParams.php';
21  $params_object = new ilExtractedParams();
22 
23  // Code for transition phase only!
24  $extractor_class_name = 'il' . str_replace('/', '', $component) . 'Extractor';
25  $final_path = './' . $component . '/classes/';
26  $final_fullpath = $final_path . 'class.' . $extractor_class_name . '.php';
27 
28  $transition_fullpath = './Services/WorkflowEngine/classes/extractors/class.' . $extractor_class_name . '.php';
29 
30  if (file_exists($final_fullpath)) {
31  require_once $final_fullpath;
32  } elseif (file_exists($transition_fullpath)) {
33  require_once $transition_fullpath;
34  }
35 
36  if (class_exists($extractor_class_name, false)) {
37  $extractor = new $extractor_class_name($params_object);
38  return $extractor;
39  } else {
40  return new stdClass();
41  }
42  }
43 }
Class ilExtractedParams.
static getExtractorByEventDescriptor($component)
Class ilExtractorFactory.