Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
ClientConfigServiceProvider | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
__invoke | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; under version 2 |
7 | * of the License (non-upgradable). |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * |
18 | * Copyright (c) 2023 (original work) Open Assessment Technologies SA. |
19 | * |
20 | * @author Andrei Shapiro <andrei.shapiro@taotesting.com> |
21 | */ |
22 | |
23 | declare(strict_types=1); |
24 | |
25 | namespace oat\tao\model\clientConfig; |
26 | |
27 | use common_ext_ExtensionsManager; |
28 | use oat\generis\model\DependencyInjection\ContainerServiceProviderInterface; |
29 | use oat\oatbox\log\LoggerService; |
30 | use oat\oatbox\session\SessionService; |
31 | use oat\oatbox\user\UserLanguageServiceInterface; |
32 | use oat\tao\helpers\dateFormatter\DateFormatterFactory; |
33 | use oat\tao\model\asset\AssetService; |
34 | use oat\tao\model\ClientLibRegistry; |
35 | use oat\tao\model\CookiePolicy\Service\CookiePolicyConfigurationRetriever; |
36 | use oat\tao\model\featureFlag\FeatureFlagConfigSwitcher; |
37 | use oat\tao\model\featureFlag\Repository\FeatureFlagRepositoryInterface; |
38 | use oat\tao\model\menu\MenuService; |
39 | use oat\tao\model\routing\ResolverFactory; |
40 | use oat\tao\model\security\xsrf\TokenService; |
41 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
42 | use tao_helpers_Mode; |
43 | |
44 | use function Symfony\Component\DependencyInjection\Loader\Configurator\service; |
45 | |
46 | class ClientConfigServiceProvider implements ContainerServiceProviderInterface |
47 | { |
48 | public function __invoke(ContainerConfigurator $configurator): void |
49 | { |
50 | $services = $configurator->services(); |
51 | |
52 | $services |
53 | ->set(ClientConfigStorage::class, ClientConfigStorage::class) |
54 | ->public() |
55 | ->args( |
56 | [ |
57 | service(TokenService::SERVICE_ID), |
58 | service(ClientLibRegistry::class), |
59 | service(FeatureFlagConfigSwitcher::class), |
60 | service(AssetService::SERVICE_ID), |
61 | service(common_ext_ExtensionsManager::SERVICE_ID), |
62 | service(ClientConfigService::SERVICE_ID), |
63 | service(UserLanguageServiceInterface::SERVICE_ID), |
64 | service(FeatureFlagRepositoryInterface::class), |
65 | service(ResolverFactory::class), |
66 | service(LoggerService::SERVICE_ID), |
67 | service(SessionService::SERVICE_ID), |
68 | service(tao_helpers_Mode::class), |
69 | service(DateFormatterFactory::class), |
70 | service(MenuService::class), |
71 | service(CookiePolicyConfigurationRetriever::class), |
72 | ] |
73 | ); |
74 | } |
75 | } |