ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAccessibilityTableDataProviderFactory.php
Go to the documentation of this file.
1<?php
2
23{
24 public const CONTEXT_DOCUMENTS = 'documents';
25
26 protected ?ilDBInterface $db = null;
27
29 {
30 switch ($context) {
33
34 default:
35 throw new InvalidArgumentException('Provider not supported');
36 }
37 }
38
42 protected function validateConfiguration(array $mandatoryMemberVariables): void
43 {
44 foreach ($mandatoryMemberVariables as $member) {
45 if (null === $this->{$member}) {
46 $exception = $this->getExceptionByMember($member);
47 throw $exception;
48 }
49 }
50 }
51
56 {
57 switch ($member) {
58 case 'db':
60 'Incomplete factory configuration. Please inject a database adapter.'
61 );
62
63 default:
64 throw new InvalidArgumentException("Exception for member {$member} not supported");
65 }
66 }
67
68 public function setDatabaseAdapter(?ilDBInterface $db): void
69 {
70 $this->db = $db;
71 }
72
74 {
75 return $this->db;
76 }
77}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilDBInterface.
$context
Definition: webdav.php:31