ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 }
static handleTimePassedEvent($workflow_engine=null)
Handles the generic time_passed event.
global $DIC
Definition: saml.php:7
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
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