imports:
    - { resource: parameters.php }
    - { resource: security.yml }
    - { resource: partkeepr.yml }
    - { resource: config_framework.yml }
    - { resource: config_doctrine.yml }
    - { resource: config_fos_user.yml }
    - { resource: config_dunglas.yml }
    - { resource: config_ldap.yml }
    - { resource: config_partkeepr.yml }
    - { resource: config_filesystem.yml }

fos_rest:
    body_listener: true
    format_listener: true
    param_fetcher_listener: force
    service:
        exception_handler: "partkeepr.exceptionwrapper"
    format_listener:
        rules:
            - priorities: [json, xml]
            - fallback_format: json
    view:
        default_engine: php
        formats:
            json: true
            xml: true
        templating_formats:
            html: false
        view_response_listener: true



sensio_framework_extra:
    view:    { annotations: false }
    router:  { annotations: true }

# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    bundles:        [ PartKeeprFrontendBundle, PartKeeprMobileFrontendBundle ]
    #java: /usr/bin/java
    filters:
        cssrewrite: ~
        #closure:
        #    jar: %kernel.root_dir%/Resources/java/compiler.jar
        #yui_css:
        #    jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar

twig:
    exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction'

dunglas_api:
    title:       "PartKeepr"
    description: "The PartKeepr REST API"
    collection:
        pagination:
            items_per_page:
                client_can_change: true

sprite_generator:
    sprites:
        fugue16:
            inDir: %kernel.root_dir%/../vendor/brainbits/fugue-icons-bundle/src/Brainbits/FugueIconsBundle/Resources/public/icons/fugue/16/
            outImage: %kernel.root_dir%/../web/spritesheets/fugue-16.png
            outCss: %kernel.root_dir%/../web/spritesheets/fugue-16.css
            relativeImagePath: ./
            padding: 5
            spriteClass: fugue-icon
            cssFormat: css
            imagePositioning: min-image
            imageGenerator: gd2
        partkeepr:
            inDir: %kernel.root_dir%/../src/PartKeepr/FrontendBundle/Resources/public/images/icons/
            outImage: %kernel.root_dir%/../web/spritesheets/partkeepr.png
            outCss: %kernel.root_dir%/../web/spritesheets/partkeepr.css
            relativeImagePath: ./
            padding: 5
            spriteClass: partkeepr-icon
            cssFormat: css
            imagePositioning: min-image
            imageGenerator: gd2

fr3d_ldap:
    driver:
        host:                   "%fr3d_ldap.driver.host%"
        port:                   "%fr3d_ldap.driver.port%"
        username:               "%fr3d_ldap.driver.username%"
        password:               "%fr3d_ldap.driver.password%"
        bindRequiresDn:         "%fr3d_ldap.driver.bindRequiresDn%"
        baseDn:                 "%fr3d_ldap.driver.baseDn%"
        accountFilterFormat:    "%fr3d_ldap.driver.accountFilterFormat%"
        optReferrals:           "%fr3d_ldap.driver.optReferrals%"
        useSsl:                 "%fr3d_ldap.driver.useSsl%"
        useStartTls:            "%fr3d_ldap.driver.useStartTls%"
        accountCanonicalForm:   "%fr3d_ldap.driver.accountCanonicalForm%"
        accountDomainName:      "%fr3d_ldap.driver.accountDomainName%"
        accountDomainNameShort: "%fr3d_ldap.driver.accountDomainNameShort%"
    user:
        baseDn: "%fr3d_ldap.user.baseDn%"
        filter: "%fr3d_ldap.user.filter%"

services:
    serializer.normalizer.custom:
        class: Symfony\Component\Serializer\Normalizer\ObjectNormalizer
        arguments:
            - "@serializer.mapping.class_metadata_factory"
            - null
            - "@serializer.property_accessor"
        tags:
            - { name: serializer.normalizer, priority: -1 }
        calls:
            - method: "setCircularReferenceLimit"
              arguments: [ [ 5 ] ]
