ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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  {
25  global $DIC;
27  $ilSetting = $DIC['ilSetting'];
28 
29  return $ilSetting->get('IL_PHPUNIT_TEST_TIME', time());
30  }
31 
32  return time();
33  }
34 
38  public static function microtime()
39  {
40  if (@defined(IL_PHPUNIT_TEST) && IL_PHPUNIT_TEST == TRUE)
41  {
42  global $DIC;
44  $ilSetting = $DIC['ilSetting'];
45 
46  return $ilSetting->get('IL_PHPUNIT_TEST_MICROTIME', time());
47  }
48 
49  return microtime();
50  }
51 
57  public static function handleTimePassedEvent($workflow_engine = null)
58  {
59  if (!$workflow_engine)
60  {
61  require_once './Services/WorkflowEngine/classes/class.ilWorkflowEngine.php';
62  $workflow_engine = new ilWorkflowEngine();
63  }
64 
65  $workflow_engine->processEvent(
66  'time_passed',
67  'time_passed',
68  'none',
69  0,
70  'none',
71  0
72  );
73  }
74 }
static handleTimePassedEvent($workflow_engine=null)
Handles the generic time_passed event.
ilWorkflowUtils is part of the petri net based workflow engine.
ilWorkflowEngine is part of the petri net based workflow engine.
global $ilSetting
Definition: privfeed.php:17
global $DIC
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27