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

PhpIncludeInspection More...

+ Inheritance diagram for ilActivationEmitter:
+ Collaboration diagram for ilActivationEmitter:

Public Member Functions

 __construct (ilNode $context)
 Default constructor. More...
 
 setTargetDetector (ilDetector $a_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 ()
 

Protected Attributes

 $name
 

Private Attributes

 $target_detector
 
 $context
 
 $emitted
 

Detailed Description

PhpIncludeInspection

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

The activation emitter is an internal signals yeoman, doing nothing but activating the designated target node. While the simple emitter triggers an open detector, this emitter is used to activate inactive nodes. In a regular petri net, all nodes are active. The modelling of nodes, which may only transit when preconditions are met, offer a decent amount of planning. To offer a shortcut and to optimize load for the workflowcontroller, nodes default to being inactive. They, as well as their detectors, feature methods that are fired during activation/deactivation. The activation emitter sits in the slot of an emitter, due to the small interface involved a comfortable place, and signals not only to a node, but activates the target node before.

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

/

Definition at line 32 of file class.ilActivationEmitter.php.

Constructor & Destructor Documentation

◆ __construct()

ilActivationEmitter::__construct ( ilNode  $context)

Default constructor.

Parameters
ilNode$contextReference to the parent node.

Definition at line 59 of file class.ilActivationEmitter.php.

References $context.

60  {
61  $this->context = $context;
62  $this->emitted = false;
63  }

Member Function Documentation

◆ emit()

ilActivationEmitter::emit ( )

Executes this emitter after activating the target node.

Implements ilEmitter.

Definition at line 98 of file class.ilActivationEmitter.php.

References array.

99  {
100  $this->emitted = true;
101  $target_node = $this->target_detector->getContext();
102  $target_node->activate();
103  $this->target_detector->trigger(array());
104  }
Create styles array
The data for the language used.

◆ getActivated()

ilActivationEmitter::getActivated ( )
Returns
bool

Definition at line 109 of file class.ilActivationEmitter.php.

References $emitted.

110  {
111  return $this->emitted;
112  }

◆ getContext()

ilActivationEmitter::getContext ( )

Returns a reference to the parent node of this emitter.

Returns
ilNode Reference to the parent node.

Implements ilWorkflowEngineElement.

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

References $context.

◆ getName()

ilActivationEmitter::getName ( )
Returns
string

Implements ilWorkflowEngineElement.

Definition at line 125 of file class.ilActivationEmitter.php.

References $name.

126  {
127  return $this->name;
128  }

◆ getTargetDetector()

ilActivationEmitter::getTargetDetector ( )

Gets the currently set target detector of this emitter.

Returns
ilDetector Reference to the target detector.

Definition at line 80 of file class.ilActivationEmitter.php.

References $target_detector.

◆ setName()

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

Implements ilWorkflowEngineElement.

Definition at line 117 of file class.ilActivationEmitter.php.

References $name.

118  {
119  $this->name = $name;
120  }

◆ setTargetDetector()

ilActivationEmitter::setTargetDetector ( ilDetector  $a_target_detector)

Sets the target detector for this emitter.

Parameters
ilDetector$a_target_detector

Definition at line 70 of file class.ilActivationEmitter.php.

71  {
72  $this->target_detector = $a_target_detector;
73  }

Field Documentation

◆ $context

ilActivationEmitter::$context
private

Definition at line 46 of file class.ilActivationEmitter.php.

Referenced by __construct(), and getContext().

◆ $emitted

ilActivationEmitter::$emitted
private

Definition at line 49 of file class.ilActivationEmitter.php.

Referenced by getActivated().

◆ $name

ilActivationEmitter::$name
protected

Definition at line 52 of file class.ilActivationEmitter.php.

Referenced by getName(), and setName().

◆ $target_detector

ilActivationEmitter::$target_detector
private

Definition at line 39 of file class.ilActivationEmitter.php.

Referenced by getTargetDetector().


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