Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| IdentifierGeneratorServiceProvider | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| __invoke | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace oat\taoQtiTest\models\IdentifierGenerator\ServiceProvider; |
| 4 | |
| 5 | use oat\generis\model\data\Ontology; |
| 6 | use oat\generis\model\DependencyInjection\ContainerServiceProviderInterface; |
| 7 | use oat\tao\model\IdentifierGenerator\Generator\IdentifierGeneratorProxy; |
| 8 | use oat\tao\model\TaoOntology; |
| 9 | use oat\taoQtiTest\models\IdentifierGenerator\Generator\QtiIdentifierGenerator; |
| 10 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
| 11 | |
| 12 | use function Symfony\Component\DependencyInjection\Loader\Configurator\service; |
| 13 | |
| 14 | class IdentifierGeneratorServiceProvider implements ContainerServiceProviderInterface |
| 15 | { |
| 16 | public function __invoke(ContainerConfigurator $configurator): void |
| 17 | { |
| 18 | $services = $configurator->services(); |
| 19 | |
| 20 | $services |
| 21 | ->set(QtiIdentifierGenerator::class, QtiIdentifierGenerator::class) |
| 22 | ->args([ |
| 23 | service(Ontology::SERVICE_ID), |
| 24 | ]); |
| 25 | |
| 26 | $services |
| 27 | ->get(IdentifierGeneratorProxy::class) |
| 28 | ->call( |
| 29 | 'addIdentifierGenerator', |
| 30 | [ |
| 31 | service(QtiIdentifierGenerator::class), |
| 32 | TaoOntology::CLASS_URI_TEST, |
| 33 | ] |
| 34 | ); |
| 35 | } |
| 36 | } |