rate_limiter.php 756 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\DependencyInjection\Loader\Configurator;
  11. use Symfony\Component\RateLimiter\RateLimiterFactory;
  12. return static function (ContainerConfigurator $container) {
  13. $container->services()
  14. ->set('cache.rate_limiter')
  15. ->parent('cache.app')
  16. ->tag('cache.pool')
  17. ->set('limiter', RateLimiterFactory::class)
  18. ->abstract()
  19. ->args([
  20. abstract_arg('config'),
  21. abstract_arg('storage'),
  22. ])
  23. ;
  24. };