ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
class.ModeFactory.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
21
namespace
ILIAS\Survey\Mode
;
22
23
use
ILIAS\Survey\InternalDomainService
;
24
use
ILIAS\Survey\InternalGUIService
;
25
use
ILIAS\Survey\InternalService
;
26
30
class
ModeFactory
31
{
33
protected
array
$providers
;
34
protected
InternalService
$service
;
35
36
public
function
__construct
()
37
{
38
$this->providers = [
39
new
Standard\ModeProvider
(),
40
new
Feedback360\ModeProvider
(),
41
new
SelfEvaluation\ModeProvider
(),
42
new
IndividualFeedback\ModeProvider
()
43
];
44
}
45
46
public
function
setInternalService
(
InternalService
$service): void
47
{
48
$this->service =
$service
;
49
}
50
51
public
function
getModeById
(
int
$id
):
ModeProvider
52
{
53
foreach
($this->providers as
$provider
) {
54
if
($provider->getId() ===
$id
) {
55
$provider->
setInternalService
($this->service);
56
return
$provider
;
57
}
58
}
59
throw
new
ModeException
(
"Unknown mode: "
. $id);
60
}
61
}
InternalGUIService
ILIAS\Survey\Mode\ModeException
Definition:
class.ModeException.php:23
ILIAS\Survey\Mode\ModeFactory\__construct
__construct()
Definition:
class.ModeFactory.php:36
ILIAS\Survey\Mode\ModeFactory\$providers
array $providers
Definition:
class.ModeFactory.php:33
InternalDomainService
ILIAS\Survey\Mode
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.AbstractUIModifier.php:21
$provider
$provider
Definition:
ltitoken.php:83
ILIAS\Survey\Mode\ModeFactory\setInternalService
setInternalService(InternalService $service)
Definition:
class.ModeFactory.php:46
ILIAS\Survey\Mode\IndividualFeedback\ModeProvider
Interface for modes.
Definition:
class.ModeProvider.php:29
ILIAS\Survey\Mode\ModeProvider\setInternalService
setInternalService(InternalService $service)
ILIAS\Survey\Mode\ModeFactory\$service
InternalService $service
Definition:
class.ModeFactory.php:34
$id
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition:
plugin.php:23
ILIAS\Survey\Mode\ModeProvider
Interface for modes.
Definition:
interface.ModeProvider.php:29
ILIAS\Survey\Mode\ModeFactory
Definition:
class.ModeFactory.php:30
ILIAS\Survey\Mode\Feedback360\ModeProvider
Interface for modes.
Definition:
class.ModeProvider.php:29
ILIAS\Survey\InternalService
Survey internal service.
Definition:
class.InternalService.php:29
ILIAS\Survey\Mode\ModeFactory\getModeById
getModeById(int $id)
Definition:
class.ModeFactory.php:51
InternalService
Modules
Survey
Mode
class.ModeFactory.php
Generated on Sun Aug 31 2025 22:01:35 for ILIAS by
1.8.13 (using
Doxyfile
)