ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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, array, and getContext().

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

◆ getActivated()

ilDataEmitter::getActivated ( )
Returns
bool

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

References $emitted.

125  {
126  return $this->emitted;
127  }

◆ 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 140 of file class.ilDataEmitter.php.

References $name.

141  {
142  return $this->name;
143  }

◆ 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 148 of file class.ilDataEmitter.php.

References $var_name.

149  {
150  return $this->var_name;
151  }

◆ setName()

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

Implements ilWorkflowEngineElement.

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

References $name.

133  {
134  $this->name = $name;
135  }

◆ 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 156 of file class.ilDataEmitter.php.

References $var_name.

157  {
158  $this->var_name = $var_name;
159  }

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: