ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilConditionService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
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.
ilConditionObjectAdapterInterface $cond_obj_adapter
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Condition utility object Wraps some ilConditionHandler methods (which will become deprecated) Depende...
static getInstance(?ilConditionObjectAdapterInterface $cond_obj_adapter=null)
__construct(?ilConditionObjectAdapterInterface $cond_obj_adapter=null)