1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-25 19:17:03 +00:00
wallabag/src/Wallabag/CoreBundle/DependencyInjection/CompilerPass/RegisterWallabagGuzzleSubscribersPass.php
2024-02-02 22:36:27 +01:00

24 lines
831 B
PHP

<?php
namespace Wallabag\CoreBundle\DependencyInjection\CompilerPass;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Wallabag\CoreBundle\Guzzle\FixupMondeDiplomatiqueUriSubscriber;
use Wallabag\CoreBundle\Helper\HttpClientFactory;
class RegisterWallabagGuzzleSubscribersPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
$definition = $container->getDefinition(HttpClientFactory::class);
// manually add subscribers for some websites
$definition->addMethodCall(
'addSubscriber', [
new Reference(FixupMondeDiplomatiqueUriSubscriber::class),
]
);
}
}