ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
Factory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ilCtrl;
24use ILIAS\Data\Factory as DataFactory;
26use ILIAS\HTTP\Services as HTTPServices;
27use ILIAS\Refinery\Factory as RefineryFactory;
29use ILIAS\SystemCheck\I\Table\Group\FactoryInterface as GroupFactoryInterface;
30use ILIAS\SystemCheck\I\Table\Task\FactoryInterface as TaskFactoryInterface;
33use ilLanguage;
34
35readonly class Factory implements FactoryInterface
36{
37 protected DataFactory $data_factory;
38 protected UIServices $ui;
39 protected ilLanguage $lng;
40 protected HTTPServices $http;
41 protected ilCtrl $ctrl;
42 protected RefineryFactory $refinery;
43
44 public function __construct()
45 {
46 global $DIC;
47 $this->data_factory = new DataFactory();
48 $this->ui = $DIC->ui();
49 $this->lng = $DIC->language();
50 $this->http = $DIC->http();
51 $this->ctrl = $DIC->ctrl();
52 $this->refinery = $DIC->refinery();
53 }
54
55 final public function group(): GroupFactoryInterface
56 {
57 return new GroupFactory(
58 $this->data_factory,
59 $this->ui,
60 $this->lng,
61 $this->http,
62 $this->ctrl
63 );
64 }
65
66 final public function task(): TaskFactoryInterface
67 {
68 return new TaskFactory(
69 $this->data_factory,
70 $this->ui,
71 $this->lng,
72 $this->http,
73 $this->refinery,
74 $this->ctrl
75 );
76 }
77}
Provides fluid interface to RBAC services.
Definition: UIServices.php:25
Builds data types.
Definition: Factory.php:36
Class Services.
Definition: Services.php:43
RefineryFactory $refinery
Definition: Factory.php:42
Class ilCtrl provides processing control methods.
language handling
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26