You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AddTranslationsPass.php 926B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace PhpBenchmarksSymfony\DependencyInjection\CompilerPass;
  3. use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
  4. use Symfony\Component\DependencyInjection\ContainerBuilder;
  5. class AddTranslationsPass implements CompilerPassInterface
  6. {
  7. public function process(ContainerBuilder $container)
  8. {
  9. $definition = $container->findDefinition('translator');
  10. $definition->addMethodCall(
  11. 'addResource',
  12. ['yml', __DIR__ . '/../../Translation/phpbenchmarks.en.yml', 'en', 'phpbenchmarks']
  13. );
  14. $definition->addMethodCall(
  15. 'addResource',
  16. ['yml', __DIR__ . '/../../Translation/phpbenchmarks.en_GB.yml', 'en_GB', 'phpbenchmarks']
  17. );
  18. $definition->addMethodCall(
  19. 'addResource',
  20. ['yml', __DIR__ . '/../../Translation/phpbenchmarks.fr_FR.yml', 'fr_FR', 'phpbenchmarks']
  21. );
  22. }
  23. }