Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 25 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
MetaMetadataServiceProvider | |
0.00% |
0 / 25 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
__invoke | |
0.00% |
0 / 25 |
|
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) 2024 (original work) Open Assessment Technologies SA; |
19 | */ |
20 | |
21 | declare(strict_types=1); |
22 | |
23 | namespace oat\taoQtiItem\model\qti\metadata\importer; |
24 | |
25 | use http\Env; |
26 | use oat\generis\model\DependencyInjection\ContainerServiceProviderInterface; |
27 | use oat\oatbox\log\LoggerService; |
28 | use oat\tao\model\Lists\Business\Service\RemoteSource; |
29 | use oat\taoBackOffice\model\lists\ListService; |
30 | use oat\taoQtiItem\model\import\ChecksumGenerator; |
31 | use oat\taoQtiItem\model\qti\metadata\exporter\CustomPropertiesManifestScanner; |
32 | use oat\taoQtiItem\model\qti\metadata\exporter\scale\ScalePreprocessor; |
33 | use oat\taoQtiItem\model\qti\metadata\ontology\MappedMetadataInjector; |
34 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
35 | |
36 | use function Symfony\Component\DependencyInjection\Loader\Configurator\env; |
37 | use function Symfony\Component\DependencyInjection\Loader\Configurator\service; |
38 | |
39 | class MetaMetadataServiceProvider implements ContainerServiceProviderInterface |
40 | { |
41 | public function __invoke(ContainerConfigurator $configurator): void |
42 | { |
43 | $services = $configurator->services(); |
44 | |
45 | $services |
46 | ->set(MappedMetadataInjector::class, MappedMetadataInjector::class) |
47 | ->args([ |
48 | service(ListService::class) |
49 | ]) |
50 | ->public(); |
51 | |
52 | $services |
53 | ->set(MetaMetadataImportMapper::class, MetaMetadataImportMapper::class) |
54 | ->args([ |
55 | service(ChecksumGenerator::class) |
56 | ]) |
57 | ->public(); |
58 | |
59 | $services |
60 | ->set(CustomPropertiesManifestScanner::class); |
61 | |
62 | $services->set(ScalePreprocessor::class) |
63 | ->args([ |
64 | service(RemoteSource::SERVICE_ID), |
65 | service(CustomPropertiesManifestScanner::class), |
66 | service(LoggerService::SERVICE_ID), |
67 | env('REMOTE_LIST_SCALE') |
68 | ->default('') |
69 | ->string() |
70 | ]) |
71 | ->public(); |
72 | } |
73 | } |