imports:
    - { resource: parameters.yml }
    - { resource: services.yml }
    
framework:
    translator: { fallbacks: ['%locale%'] }
    secret:          "%secret%"
    router:
        resource: "%kernel.root_dir%/config/routing.yml"
        strict_requirements: ~
    form:            ~
    csrf_protection: ~
    templating:
        engines: ['twig']
    default_locale:  "%locale%"
    trusted_hosts:   ~
    session:
        handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
    fragments:       ~
    http_method_override: true

# Twig Configuration
twig:
    debug: "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    form_theme:
            - 'bootstrap_3_layout.html.twig'
    globals:
        webserviceversion: "1.0.0"

# Session storage in db
services:
    Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler:
            public:    false
            arguments:
                - '%database_spsession_dsn%'
                - { db_table: backend_session, db_id_col: session_id, db_data_col: session_value, db_time_col: session_time, db_lifetime_col: session_lifetime, db_username: '%database_spsession_user%', db_password: '%database_spsession_password%' }


# Assetic Configuration
assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        [ ]
    filters:
        cssrewrite: ~


# Swiftmailer Configuration
swiftmailer:
    transport: "%mailer_transport%"
    host:      "%mailer_host%"
    username:  "%mailer_user%"
    password:  "%mailer_password%"
    spool:     { type: memory }

# Doctrine Configuration
doctrine:
    dbal:
        default_connection: Backend
        types:
            uuid: Ramsey\Uuid\Doctrine\UuidType
            uuid_binary: Ramsey\Uuid\Doctrine\UuidBinaryType
        connections:
            Backend:
                driver:   "%database_backend_driver%"
                host:     "%database_backend_host%"
                port:     "%database_backend_port%"
                dbname:   "%database_backend_name%"
                user:     "%database_backend_user%"
                password: "%database_backend_password%"
                charset:  UTF8
            ServiceProvider:
                driver:   "%database_sp_driver%"
                host:     "%database_sp_host%"
                port:     "%database_sp_port%"
                dbname:   "%database_sp_name%"
                user:     "%database_sp_user%"
                password: "%database_sp_password%"
                charset:  UTF8
            Webservice:
                driver:   "%database_webservice_driver%"
                host:     "%database_webservice_host%"
                port:     "%database_webservice_port%"
                dbname:   "%database_webservice_name%"
                user:     "%database_webservice_user%"
                password: "%database_webservice_password%"
                charset:  UTF8
    orm:
        default_entity_manager: Backend
        entity_managers:
            Backend:
                connection: Backend
                mappings:
                    SsoAccessBundle: ~
                    LifeStyleToolsBackendSecurityBundle:  ~
                    FOSUserBundle: ~
                    LifeStyleToolsDbLogBundle:  ~
                    SsoBackendBundle:  ~
            ServiceProvider:
                connection: ServiceProvider
                mappings:
                    LifeStyleToolsCredentialsBundle: ~
            Webservice:
                connection: Webservice
                mappings:
                    SsoWebservicesObjectBundle: ~
                    
fos_user:
    db_driver: orm
    firewall_name: main
    user_class: LifeStyle\Tools\BackendSecurityBundle\Entity\User
    from_email:
        address: "inquiries@sso.eu"
        sender_name: "Sso Customer Service"