services:
    gos_pubsub_router.cache_warmer.router:
        class: Gos\Bundle\PubSubRouterBundle\CacheWarmer\RouterCacheWarmer
        public: false
        arguments:
            - '@Psr\Container\ContainerInterface'
        tags:
            - { name: container.service_subscriber, id: 'gos_pubsub_router.router_registry' }
            - { name: kernel.cache_warmer }

    gos_pubsub_router.command.debug_router:
        class: Gos\Bundle\PubSubRouterBundle\Command\DebugRouterCommand
        arguments:
            - '@gos_pubsub_router.router_registry'
        tags:
            - { name: console.command, command: gos:prouter:debug }

    gos_pubsub_router.loader.closure:
        class: Gos\Bundle\PubSubRouterBundle\Loader\ClosureLoader
        public: false
        tags:
            - { name: gos_pubsub_router.routing.loader }

    gos_pubsub_router.loader.container:
        class: Gos\Bundle\PubSubRouterBundle\Loader\ContainerLoader
        public: false
        arguments:
            - !tagged_locator { tag: 'gos_pubsub_router.routing.route_loader' }
        tags:
            - { name: gos_pubsub_router.routing.loader }

    gos_pubsub_router.loader.glob:
        class: Gos\Bundle\PubSubRouterBundle\Loader\GlobFileLoader
        public: false
        arguments:
            - '@file_locator'
        tags:
            - { name: gos_pubsub_router.routing.loader }

    gos_pubsub_router.loader.php:
        class: Gos\Bundle\PubSubRouterBundle\Loader\PhpFileLoader
        public: false
        arguments:
            - '@file_locator'
        tags:
            - { name: gos_pubsub_router.routing.loader }

    gos_pubsub_router.loader.xml:
        class: Gos\Bundle\PubSubRouterBundle\Loader\XmlFileLoader
        public: false
        arguments:
            - '@file_locator'
        tags:
            - { name: gos_pubsub_router.routing.loader }

    gos_pubsub_router.loader.yaml:
        class: Gos\Bundle\PubSubRouterBundle\Loader\YamlFileLoader
        public: false
        arguments:
            - '@file_locator'
        tags:
            - { name: gos_pubsub_router.routing.loader }

    gos_pubsub_router.router_registry:
        class: Gos\Bundle\PubSubRouterBundle\Router\RouterRegistry
        public: true

    gos_pubsub_router.routing.loader:
        class: Symfony\Component\Config\Loader\DelegatingLoader
        public: false
        arguments:
            - '@gos_pubsub_router.routing.resolver'

    gos_pubsub_router.routing.resolver:
        class: Symfony\Component\Config\Loader\LoaderResolver
        public: false
