5 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
7 require_once
'./Services/WorkflowEngine/interfaces/ilExternalDetector.php';
150 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
166 if ($this->listening_start == 0 && $this->listening_end == 0)
172 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
177 || $this->listening_end == 0)
200 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowInvalidArgumentException.php';
212 if($this->timer_relative)
214 if($this->timer_start == 0)
216 $this->listening_start =
time();
222 if($this->timer_limit != 0)
228 $this->listening_end = 0;
250 $this->db_id = $a_id;
260 if ($this->db_id != null)
266 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
278 if ($this->db_id == null)
292 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
293 ilWorkflowDbHelper::writeDetector($this);
302 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
303 ilWorkflowDbHelper::deleteDetector($this);
313 return array(
'type' => $this->event_type,
'content' => $this->event_content);
323 return array(
'type' => $this->event_subject_type,
'identifier' => $this->event_subject_identifier);
333 return array(
'type' => $this->event_context_type,
'identifier' => $this->event_context_identifier);
342 return array (
'listening_start' => $this->listening_start,
'listening_end' => $this->listening_end);
writeDetectorToDb()
Passes this detector to the ilWorkflowDBHelper in order to write or update the detector data to the d...
getDetectorState()
Returns if the current detector state is satisfied or not.
getDbId()
Returns the database id of the detector if set.
getEventContext()
Get the event context set to the detector.
getEventSubject()
Get the event subject set to the detector.
setListeningTimeframe($listening_start, $listening_end)
Sets the timeframe, in which the detector is listening.
onActivate()
Method called on activation.
setTimerLimit($timer_limit)
Sets the timers limit.
$event_context_identifier
deleteDetectorFromDb()
Passes this detector to the ilWorkflowDbHelper in order to remove the detector data from the database...
getTimerLimit()
Returns the currently set timers limit.
setDbId($a_id)
Sets the database id of the detector.
Create styles array
The data for the language used.
setDetectorState($new_state)
Sets a new detector state.
$event_subject_identifier
hasDbId()
Returns, if the detector has a database id.
__construct($context)
Default constructor, passing the context to the parent constructor.
trigger($params)
Trigger this detector.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
getListeningTimeframe()
Returns the listening timefrage of the detector.
getEvent()
Returns the event type and content currently set to the detector.
setTimerRelative($timer_relative)
onDeactivate()
Method called on deactivation.
setTimerStart($timer_start)
Sets the timers start datetime.
isListening()
Returns if the detector is currently listening.
getTimerStart()
Returns the currently set timer start.