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

PhpIncludeInspection More...

+ Inheritance diagram for ilDataEmitter:
+ Collaboration diagram for ilDataEmitter:

Public Member Functions

 __construct (ilNode $context)
 Default constructor. More...
 
 setTargetDetector (ilDetector $target_detector)
 Sets the target detector for this emitter. More...
 
 getTargetDetector ()
 Gets the currently set target detector of this emitter. More...
 
 getContext ()
 Returns a reference to the parent node of this emitter. More...
 
 emit ()
 Executes this emitter after activating the target node. More...
 
 getActivated ()
 
 setName ($name)
 
 getName ()
 
 getVarName ()
 
 setVarName ($var_name)
 

Protected Attributes

 $name
 
 $var_name
 

Private Attributes

 $target_detector
 
 $context
 
 $emitted
 

Detailed Description

PhpIncludeInspection

PhpIncludeInspection PhpIncludeInspection PhpIncludeInspection ilDataEmitter is part of the petri net based workflow engine.

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

/

Definition at line 21 of file class.ilDataEmitter.php.

Constructor & Destructor Documentation

◆ __construct()

ilDataEmitter::__construct ( ilNode  $context)

Default constructor.

Parameters
ilNode$contextReference to the parent node.

Definition at line 51 of file class.ilDataEmitter.php.

References $context.

52  {
53  $this->context = $context;
54  $this->emitted = false;
55  }

Member Function Documentation

◆ emit()

ilDataEmitter::emit ( )

Executes this emitter after activating the target node.

Implements ilEmitter.

Definition at line 90 of file class.ilDataEmitter.php.

References $target, $var_name, and getContext().

91  {
92  $instance_vars = $this->context->getContext()->getInstanceVars();
93 
95  foreach ($instance_vars as $instance_var) {
96  if ($instance_var['id'] == $this->var_name) {
97  if ($instance_var['reference']) {
98  $target = $instance_var['target'];
99  }
100  }
101  }
102 
103  foreach ((array) $this->context->getContext()->getInstanceVars() as $value) {
104  if ($value['id'] == $target) {
105  $this->getContext()->getContext()->setInstanceVarById($target, $value['value']);
106  }
107  }
108 
109  if ($this->target_detector instanceof ilDetector) {
110  $this->target_detector->trigger(array());
111  }
112  $this->emitted = true;
113  }
getContext()
Returns a reference to the parent node of this emitter.
ilDetector Interface is part of the petri net based workflow engine.
Definition: ilDetector.php:16
$target
Definition: test.php:19
+ Here is the call graph for this function:

◆ getActivated()

ilDataEmitter::getActivated ( )
Returns
bool

Definition at line 118 of file class.ilDataEmitter.php.

References $emitted.

119  {
120  return $this->emitted;
121  }

◆ getContext()

ilDataEmitter::getContext ( )

Returns a reference to the parent node of this emitter.

Returns
ilNode Reference to the parent node.

Implements ilWorkflowEngineElement.

Definition at line 82 of file class.ilDataEmitter.php.

References $context.

Referenced by emit().

83  {
84  return $this->context;
85  }
+ Here is the caller graph for this function:

◆ getName()

ilDataEmitter::getName ( )
Returns
string

Implements ilWorkflowEngineElement.

Definition at line 134 of file class.ilDataEmitter.php.

References $name.

135  {
136  return $this->name;
137  }

◆ getTargetDetector()

ilDataEmitter::getTargetDetector ( )

Gets the currently set target detector of this emitter.

Returns
ilDetector Reference to the target detector.

Definition at line 72 of file class.ilDataEmitter.php.

References $target_detector.

73  {
75  }

◆ getVarName()

ilDataEmitter::getVarName ( )
Returns
string

Definition at line 142 of file class.ilDataEmitter.php.

References $var_name.

143  {
144  return $this->var_name;
145  }

◆ setName()

ilDataEmitter::setName (   $name)
Parameters
string$name

Implements ilWorkflowEngineElement.

Definition at line 126 of file class.ilDataEmitter.php.

References $name.

127  {
128  $this->name = $name;
129  }

◆ setTargetDetector()

ilDataEmitter::setTargetDetector ( ilDetector  $target_detector)

Sets the target detector for this emitter.

Parameters
ilDetector$target_detector

Definition at line 62 of file class.ilDataEmitter.php.

References $target_detector.

63  {
64  $this->target_detector = $target_detector;
65  }

◆ setVarName()

ilDataEmitter::setVarName (   $var_name)
Parameters
string$var_name

Definition at line 150 of file class.ilDataEmitter.php.

References $var_name.

151  {
152  $this->var_name = $var_name;
153  }

Field Documentation

◆ $context

ilDataEmitter::$context
private

Definition at line 35 of file class.ilDataEmitter.php.

Referenced by __construct(), and getContext().

◆ $emitted

ilDataEmitter::$emitted
private

Definition at line 38 of file class.ilDataEmitter.php.

Referenced by getActivated().

◆ $name

ilDataEmitter::$name
protected

Definition at line 41 of file class.ilDataEmitter.php.

Referenced by getName(), and setName().

◆ $target_detector

ilDataEmitter::$target_detector
private

Definition at line 28 of file class.ilDataEmitter.php.

Referenced by getTargetDetector(), and setTargetDetector().

◆ $var_name

ilDataEmitter::$var_name
protected

Definition at line 44 of file class.ilDataEmitter.php.

Referenced by emit(), getVarName(), and setVarName().


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