-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDataProviderPass.php
More file actions
46 lines (39 loc) · 1.49 KB
/
DataProviderPass.php
File metadata and controls
46 lines (39 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
declare(strict_types=1);
/**
* This source file is available under the terms of the
* Pimcore Open Core License (POCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
* @license Pimcore Open Core License (POCL)
*/
namespace Pimcore\Bundle\StudioBackendBundle\DependencyInjection\CompilerPass;
use Pimcore\Bundle\StudioBackendBundle\Exception\MustImplementInterfaceException;
use Pimcore\Bundle\StudioBackendBundle\Gdpr\Provider\DataProviderInterface;
use Pimcore\Bundle\StudioBackendBundle\Gdpr\Service\Loader\TaggedIteratorDataProviderLoader;
use Pimcore\Bundle\StudioBackendBundle\Util\Trait\MustImplementInterfaceTrait;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* @internal
*/
final readonly class DataProviderPass implements CompilerPassInterface
{
use MustImplementInterfaceTrait;
/**
* @throws MustImplementInterfaceException
*/
public function process(ContainerBuilder $container): void
{
$taggedServices = array_keys(
[
... $container->findTaggedServiceIds(TaggedIteratorDataProviderLoader::DATA_PROVIDER_TAG),
]
);
foreach ($taggedServices as $environmentType) {
$this->checkInterface($environmentType, DataProviderInterface::class);
}
}
}