ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilWorkflowUtils.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3
15{
21 public static function time()
22 {
23 if (@defined(IL_PHPUNIT_TEST) && IL_PHPUNIT_TEST == true) {
24 global $DIC;
26 $ilSetting = $DIC['ilSetting'];
27
28 return $ilSetting->get('IL_PHPUNIT_TEST_TIME', time());
29 }
30
31 return time();
32 }
33
37 public static function microtime()
38 {
39 if (@defined(IL_PHPUNIT_TEST) && IL_PHPUNIT_TEST == true) {
40 global $DIC;
42 $ilSetting = $DIC['ilSetting'];
43
44 return $ilSetting->get('IL_PHPUNIT_TEST_MICROTIME', time());
45 }
46
47 return microtime();
48 }
49
55 public static function handleTimePassedEvent($workflow_engine = null)
56 {
57 if (!$workflow_engine) {
58 require_once './Services/WorkflowEngine/classes/class.ilWorkflowEngine.php';
59 $workflow_engine = new ilWorkflowEngine();
60 }
61
62 $workflow_engine->processEvent(
63 'time_passed',
64 'time_passed',
65 'none',
66 0,
67 'none',
68 0
69 );
70 }
71}
An exception for terminatinating execution or to throw for unit testing.
ilWorkflowEngine is part of the petri net based workflow engine.
ilWorkflowUtils is part of the petri net based workflow engine.
static handleTimePassedEvent($workflow_engine=null)
Handles the generic time_passed event.
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46