services:
  _defaults:
    autowire: true
    autoconfigure: true
    public: true

  IService\Bundle\:
    resource: '../../*'
    exclude: [
        '../../{Resources,DependencyInjection,EventListener,Exception,Model,Money}',
        '../../IServiceBundle.php',
        '../../Mailer/Transport/*.php',
    ]

  IService\Bundle\Mailer\Transport\ISRETransportFactory:
    tags: [ mailer.transport_factory ]

  # Validation
  IService\Bundle\Service\ValidationService:

  IService\Bundle\EventListener\ParameterValidatorEventListener:
    arguments:
      $validation: '@IService\Bundle\Service\ValidationService'
      $reader: '@annotations.cached_reader'
    tags:
      - { name: kernel.event_listener, event: kernel.controller }

  # Paging/sorting/filtering
  IService\Bundle\Service\PaginationService:
    arguments:
      $paginator: '@knp_paginator'
      $urlGenerator: '@router.default'