imports:
    - { resource: parameters.yml }
    - { resource: security.yml }
    - { resource: services.yml }

# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
    locale: en

framework:
    #esi:             ~
    #translator:      { fallbacks: ["%locale%"] }
    secret:          "%secret%"
    router:
        resource: "%kernel.root_dir%/config/routing.yml"
        strict_requirements: ~
    form:            ~
    csrf_protection: ~
    validation:      { enable_annotations: true }
    #serializer:      { enable_annotations: true }
    templating:
        engines: ['twig']
    default_locale:  "%locale%"
    trusted_hosts:   ~
    trusted_proxies: ~
    session:
        handler_id:  ~
    fragments:       ~
    http_method_override: true
    assets: ~

# Twig Configuration
twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    globals:
        iservice : "%iservice%"
        pricing_matrix: "%pricing_matrix%"
        spotlight: "%spotlight%"
        checkin : "%checkin%"
        my_review: "%my_review%"
        ipay: "%ipay%"
        mpi: '%mpi%'
        nmi_tokenization_key: '%nmi_tokenization_key%'
        preview: '%preview%'
        cdk: '%cdk%'
        upgrade: '%upgrade%'
 ##       myloan: '%myloan%'
    form_themes:
        - 'bootstrap_3_layout.html.twig'
#        client_url: "%client_url%"
# Doctrine Configuration
doctrine:
    dbal:
        driver:   pdo_mysql
        host:     "%database_host%"
        port:     "%database_port%"
        dbname:   "%database_name%"
        user:     "%database_user%"
        password: "%database_password%"
        charset:  UTF8
        # if using pdo_sqlite as your database driver:
        #   1. add the path in parameters.yml
        #     e.g. database_path: "%kernel.root_dir%/../var/data/data.sqlite"
        #   2. Uncomment database_path in parameters.yml.dist
        #   3. Uncomment next line:
        #path:     "%database_path%"

    orm:
        auto_generate_proxy_classes: "%kernel.debug%"
        naming_strategy: doctrine.orm.naming_strategy.underscore
        auto_mapping: true

# Swiftmailer Configuration
swiftmailer:
    transport: "%mailer_transport%"
    host:      "%mailer_host%"
    username:  "%mailer_user%"
    password:  "%mailer_password%"
    spool:     { type: memory }
# Nelmio CORS Configuration
nelmio_cors:
    defaults:
        allow_credentials: false
        allow_origin: ['*']
        allow_headers: ['*']
        allow_methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS']
        max_age: 3600
        hosts: []
        origin_regex: false
    paths:
        '^/api/':
            allow_origin: ['*']
            allow_headers: ['X-Custom-Auth', 'Content-Type']
            allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'OPTIONS']
            max_age: 3600
# FOSRest Configuration
fos_rest:
    body_listener: true
    format_listener:
        rules:
            - { path: '^/api', priorities: ['json'], fallback_format: json, prefer_extension: false }
            - { path: '^/', priorities: [ 'html', '*/*'], fallback_format: ~, prefer_extension: true }
    param_fetcher_listener: true
    view:
        view_response_listener: 'force'
        formats:
            json: true
vich_uploader:
    db_driver: orm
    mappings:
        coupon_image:
            uri_prefix:         /images/uploads/coupons
            upload_destination: '%kernel.root_dir%/../web/images/uploads/coupons'
        logo_image:
            uri_prefix:         /images/uploads/dealer
            upload_destination: '%kernel.root_dir%/../web/images/uploads/dealer'
        appraise_my_car_video_file:
            uri_prefix:         /uploads/appraisal_videos
            upload_destination: '%kernel.root_dir%/../web/uploads/appraisal_videos'
        myreview_image:
            uri_prefix:         /images/uploads/myreview
            upload_destination: '%kernel.root_dir%/../web/images/uploads/myreview'
nelmio_api_doc:
    documentation:
        schemes: [http, https]
        info:
            title: Preview API
            description: The api supporting the Preview product for iService Products LLC.
            version: 0.0.1
        securityDefinitions:
            Bearer:
                type: apiKey
                description: 'Value: Bearer {jwt}'
                name: Authorization
                in: header
        security:
            - Bearer: []
    areas:
        default:
            path_patterns: # an array of regexps
                - ^/api/preview/app/(?!doc$)
