PHP 8.3.31
Preview: RegisterLocaleAwareServicesPass.php Size: 1.36 KB
/home/getspomw/royalsquad.us/vendor/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpKernel\DependencyInjection;

use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
 * Register all services that have the "kernel.locale_aware" tag into the listener.
 *
 * @author Pierre Bobiet <pierrebobiet@gmail.com>
 */
class RegisterLocaleAwareServicesPass implements CompilerPassInterface
{
    public function process(ContainerBuilder $container): void
    {
        if (!$container->hasDefinition('locale_aware_listener')) {
            return;
        }

        $services = [];

        foreach ($container->findTaggedServiceIds('kernel.locale_aware') as $id => $tags) {
            $services[] = new Reference($id);
        }

        if (!$services) {
            $container->removeDefinition('locale_aware_listener');

            return;
        }

        $container
            ->getDefinition('locale_aware_listener')
            ->setArgument(0, new IteratorArgument($services))
        ;
    }
}

Directory Contents

Dirs: 0 × Files: 14

Name Size Perms Modified Actions
4.27 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
1.23 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
2.99 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
15.83 KB lrw-r--r-- 2026-04-27 10:18:53
Edit Download
1.63 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
2.04 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
1.38 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
1.46 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
1.10 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
11.73 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
1.36 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
2.71 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
2.09 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download
1.59 KB lrw-rw-rw- 2025-09-17 06:53:21
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).