1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* For licensing terms, see /license.txt */ |
4
|
|
|
|
5
|
|
|
declare(strict_types=1); |
6
|
|
|
|
7
|
|
|
namespace Chamilo\CoreBundle\ServiceHelper; |
8
|
|
|
|
9
|
|
|
use Symfony\Component\HttpKernel\KernelInterface; |
10
|
|
|
use Symfony\Component\Messenger\MessageBusInterface; |
11
|
|
|
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
12
|
|
|
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; |
13
|
|
|
use Symfony\Component\Validator\Validator\ValidatorInterface; |
14
|
|
|
|
15
|
|
|
class ContainerHelper |
16
|
|
|
{ |
17
|
|
|
private AuthorizationCheckerInterface $authorizationChecker; |
18
|
|
|
private TokenStorageInterface $tokenStorage; |
19
|
|
|
private KernelInterface $kernel; |
20
|
|
|
private MessageBusInterface $messengerBus; |
21
|
|
|
private ValidatorInterface $validator; |
22
|
|
|
|
23
|
|
|
public function getAuthorizationChecker(): AuthorizationCheckerInterface |
24
|
|
|
{ |
25
|
|
|
return $this->authorizationChecker; |
26
|
|
|
} |
27
|
|
|
|
28
|
|
|
public function setAuthorizationChecker(AuthorizationCheckerInterface $authorizationChecker): void |
29
|
|
|
{ |
30
|
|
|
$this->authorizationChecker = $authorizationChecker; |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
public function getTokenStorage(): TokenStorageInterface |
34
|
|
|
{ |
35
|
|
|
return $this->tokenStorage; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
public function setTokenStorage(TokenStorageInterface $tokenStorage): void |
39
|
|
|
{ |
40
|
|
|
$this->tokenStorage = $tokenStorage; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
public function getKernel(): KernelInterface |
44
|
|
|
{ |
45
|
|
|
return $this->kernel; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function setKernel(KernelInterface $kernel): void |
49
|
|
|
{ |
50
|
|
|
$this->kernel = $kernel; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
public function getMessengerBus(): MessageBusInterface |
54
|
|
|
{ |
55
|
|
|
return $this->messengerBus; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
public function setMessengerBus(MessageBusInterface $messengerBus): void |
59
|
|
|
{ |
60
|
|
|
$this->messengerBus = $messengerBus; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function getValidator(): ValidatorInterface |
64
|
|
|
{ |
65
|
|
|
return $this->validator; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
public function setValidator(ValidatorInterface $validator): void |
69
|
|
|
{ |
70
|
|
|
$this->validator = $validator; |
71
|
|
|
} |
72
|
|
|
} |
73
|
|
|
|