<?php


namespace AutoAdmin\Bundle\Media\DependencyInjection\Compiler;


use AutoAdmin\Bundle\Media\Resolver\WebPathResolver;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class LiipResolverPass implements CompilerPassInterface
{
    const LIIP_WEB_RESOLVER = 'liip_imagine.cache.resolver.prototype.web_path';

    public function process(ContainerBuilder $container): void
    {
        $def = $container->getDefinition(self::LIIP_WEB_RESOLVER);
        $def->setClass(WebPathResolver::class);
        $container->setDefinition(self::LIIP_WEB_RESOLVER, $def);
    }
}