5require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
7require_once
'./Services/WorkflowEngine/interfaces/ilExternalDetector.php';
150 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
151 if ($this->timer_limit + $this->timer_start <= ilWorkflowUtils::time())
166 if ($this->listening_start == 0 && $this->listening_end == 0)
172 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
173 if ($this->listening_start < ilWorkflowUtils::time())
176 if ($this->listening_end > ilWorkflowUtils::time()
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);
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
getDetectorState()
Returns if the current detector state is satisfied or not.
setDetectorState($new_state)
Sets a new detector state.
@noinspection PhpIncludeInspection
writeDetectorToDb()
Passes this detector to the ilWorkflowDBHelper in order to write or update the detector data to the d...
setListeningTimeframe($listening_start, $listening_end)
Sets the timeframe, in which the detector is listening.
getListeningTimeframe()
Returns the listening timefrage of the detector.
onActivate()
Method called on activation.
getEventContext()
Get the event context set to the detector.
$event_subject_identifier
getTimerStart()
Returns the currently set timer start.
getTimerLimit()
Returns the currently set timers limit.
isListening()
Returns if the detector is currently listening.
getEvent()
Returns the event type and content currently set to the detector.
getDbId()
Returns the database id of the detector if set.
hasDbId()
Returns, if the detector has a database id.
$event_context_identifier
setTimerLimit($timer_limit)
Sets the timers limit.
trigger($params)
Trigger this detector.
deleteDetectorFromDb()
Passes this detector to the ilWorkflowDbHelper in order to remove the detector data from the database...
getEventSubject()
Get the event subject set to the detector.
$event_type
Holds the type of the event to listen for.
setDbId($a_id)
Sets the database id of the detector.
setTimerRelative($timer_relative)
onDeactivate()
Method called on deactivation.
__construct($context)
Default constructor, passing the context to the parent constructor.
setTimerStart($timer_start)
Sets the timers start datetime.
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection