ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilConditionService.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
27 {
29 
30  protected function __construct(?ilConditionObjectAdapterInterface $cond_obj_adapter = null)
31  {
32  if (is_null($cond_obj_adapter)) {
33  $this->cond_obj_adapter = new ilConditionObjectAdapter();
34  } else {
35  $this->cond_obj_adapter = $cond_obj_adapter;
36  }
37  }
38 
39  public static function getInstance(ilConditionObjectAdapterInterface $cond_obj_adapter = null): ilConditionService
40  {
41  return new self($cond_obj_adapter);
42  }
43 
44  public function factory(): ilConditionFactory
45  {
46  return new ilConditionFactory($this->cond_obj_adapter ?? new ilConditionObjectAdapter());
47  }
48 
49  public function util(): ilConditionUtil
50  {
51  return new ilConditionUtil();
52  }
53 }
Wraps ilObject dependencies.
static getInstance(ilConditionObjectAdapterInterface $cond_obj_adapter=null)
ilConditionObjectAdapterInterface $cond_obj_adapter
Condition utility object Wraps some ilConditionHandler methods (which will become deprecated) Depende...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(?ilConditionObjectAdapterInterface $cond_obj_adapter=null)