5require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
7require_once
'./Services/WorkflowEngine/interfaces/ilExternalDetector.php';
149 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
150 if ($this->timer_limit + $this->timer_start <= ilWorkflowUtils::time()) {
164 if ($this->listening_start == 0 && $this->listening_end == 0) {
169 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
170 if ($this->listening_start < ilWorkflowUtils::time()) {
172 if ($this->listening_end > ilWorkflowUtils::time()
173 || $this->listening_end == 0) {
194 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowInvalidArgumentException.php';
206 if ($this->timer_relative) {
207 if ($this->timer_start == 0) {
208 $this->listening_start = time();
212 if ($this->timer_limit != 0) {
215 $this->listening_end = 0;
238 $this->db_id = $a_id;
248 if ($this->db_id !=
null) {
251 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
263 if ($this->db_id ==
null) {
276 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
277 ilWorkflowDbHelper::writeDetector($this);
286 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
287 ilWorkflowDbHelper::deleteDetector($this);
297 return array(
'type' => $this->event_type,
'content' => $this->event_content);
307 return array(
'type' => $this->event_subject_type,
'identifier' => $this->event_subject_identifier);
317 return array(
'type' => $this->event_context_type,
'identifier' => $this->event_context_identifier);
326 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