ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilExtractorFactory Class Reference

Class ilExtractorFactory. More...

+ Collaboration diagram for ilExtractorFactory:

Static Public Member Functions

static getExtractorByEventDescriptor ($component)
 

Detailed Description

Class ilExtractorFactory.

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

Definition at line 11 of file class.ilExtractorFactory.php.

Member Function Documentation

◆ getExtractorByEventDescriptor()

static ilExtractorFactory::getExtractorByEventDescriptor (   $component)
static
Parameters
string$component
Returns
ilExtractor|stdClass

Definition at line 18 of file class.ilExtractorFactory.php.

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 {
32 require_once $final_fullpath;
33 }
34 else if( file_exists( $transition_fullpath) )
35 {
36 require_once $transition_fullpath;
37 }
38
39 if( class_exists($extractor_class_name, false))
40 {
41 $extractor = new $extractor_class_name($params_object);
42 return $extractor;
43 }
44 else
45 {
46 return new stdClass();
47 }
48 }
Class ilExtractedParams.

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