# Learn more about services, parameters and containers at
# http://symfony.com/doc/current/book/service_container.html
parameters:
    default_locale: en

services:
    # default configuration for services in *this* file
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

    # makes classes in src/ available to be used as services
    # this creates a service per class whose id is the fully-qualified class name
    App\:
        resource: '../src/*'
        exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'

    # controllers are imported separately to make sure services can be injected
    # as action arguments even if you don't extend any base controller class
    App\Controller\:
        resource: '../src/Controller'
        tags: ['controller.service_arguments']

    # add controllers as services that are specific to a certain sulu context
    # a sulu context is a different mode in the kernel allowing to have a different set of services
    # because controllers might rely on services only existing in one of both contexts
    App\Controller\Admin\:
        resource: '../src/Controller/Admin'
        tags: ['controller.service_arguments', {name: 'sulu.context', context: 'admin'}]

    App\Controller\Website\:
        resource: '../src/Controller/Website'
        tags: ['controller.service_arguments', {name: 'sulu.context', context: 'website'}]

    # add more service definitions when explicit configuration is needed
    # please note that last definitions always *replace* previous ones
