mirror of
https://github.com/wallabag/wallabag.git
synced 2024-05-20 01:58:06 +00:00
25 lines
831 B
PHP
25 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),
|
|
]
|
|
);
|
|
}
|
|
}
|