| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total | n/a | 0 / 0 | n/a | 0 / 0 | CRAP | n/a | 0 / 0 | |||
| RoutingServiceProvider | n/a | 0 / 0 | n/a | 0 / 0 | 1 | n/a | 0 / 0 | |||
| __invoke | n/a | 0 / 0 | n/a | 0 / 0 | 1 | |||||
| 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) 2021 (original work) Open Assessment Technologies SA; | 
| 19 | */ | 
| 20 | |
| 21 | declare(strict_types=1); | 
| 22 | |
| 23 | namespace oat\tao\model\routing\ServiceProvider; | 
| 24 | |
| 25 | use oat\generis\model\DependencyInjection\ContainerServiceProviderInterface; | 
| 26 | use oat\oatbox\log\LoggerService; | 
| 27 | use oat\oatbox\service\ServiceManager; | 
| 28 | use oat\tao\model\routing\AnnotationReaderService; | 
| 29 | use oat\tao\model\routing\Listener\AnnotationCacheWarmupListener; | 
| 30 | use oat\tao\model\routing\ResolverFactory; | 
| 31 | use oat\tao\model\routing\Service\ActionFinder; | 
| 32 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | 
| 33 | |
| 34 | use function Symfony\Component\DependencyInjection\Loader\Configurator\service; | 
| 35 | |
| 36 | /** | 
| 37 | * @codeCoverageIgnore | 
| 38 | */ | 
| 39 | class RoutingServiceProvider implements ContainerServiceProviderInterface | 
| 40 | { | 
| 41 | public function __invoke(ContainerConfigurator $configurator): void | 
| 42 | { | 
| 43 | $services = $configurator->services(); | 
| 44 | |
| 45 | $services->set(ActionFinder::class, ActionFinder::class) | 
| 46 | ->args( | 
| 47 | [ | 
| 48 | service(ContainerServiceProviderInterface::CONTAINER_SERVICE_ID), | 
| 49 | service(LoggerService::SERVICE_ID), | 
| 50 | ] | 
| 51 | ) | 
| 52 | ->public(); | 
| 53 | |
| 54 | $services | 
| 55 | ->set(ResolverFactory::class, ResolverFactory::class) | 
| 56 | ->args( | 
| 57 | [ | 
| 58 | service(ServiceManager::class), | 
| 59 | ] | 
| 60 | ); | 
| 61 | |
| 62 | $services | 
| 63 | ->set(AnnotationCacheWarmupListener::class, AnnotationCacheWarmupListener::class) | 
| 64 | ->public() | 
| 65 | ->args( | 
| 66 | [ | 
| 67 | service(AnnotationReaderService::class), | 
| 68 | service(\common_ext_ExtensionsManager::SERVICE_ID) | 
| 69 | ] | 
| 70 | ); | 
| 71 | } | 
| 72 | } |