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

services:
    #service_name:
    #    class: AppBundle\Directory\ClassName
    #    arguments: ['@another_service_name', 'plain_value', '%parameter_name%']

    prestashop.webservice:
        class: AppBundle\Manager\PrestashopWebService
        arguments:
            - '%prestashop_ws_url%'
            - '%prestashop_ws_key%'
            - '%prestashop_ws_debug%'
            
    sync.logger:
        class: AppBundle\Utility\Logger
        arguments:
            - "@=service('doctrine')"
            - "@validator"

    AppBundle\Manager\ChaussurePrestashopSyncManager:
        class: AppBundle\Manager\ChaussurePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\ColorisPrestashopSyncManager:
        class: AppBundle\Manager\ColorisPrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\GenrePrestashopSyncManager:
        class: AppBundle\Manager\GenrePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\GenreTypePrestashopSyncManager:
        class: AppBundle\Manager\GenreTypePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\MaroquineriePrestashopSyncManager:
        class: AppBundle\Manager\MaroquineriePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\MatierePrestashopSyncManager:
        class: AppBundle\Manager\MatierePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\PointurePrestashopSyncManager:
        class: AppBundle\Manager\PointurePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\ProduitPrestashopSyncManager:
        class: AppBundle\Manager\ProduitPrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\SemellePrestashopSyncManager:
        class: AppBundle\Manager\SemellePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\StockPrestashopSyncManager:
        class: AppBundle\Manager\StockPrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\TalonPrestashopSyncManager:
        class: AppBundle\Manager\TalonPrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Manager\TypePrestashopSyncManager:
        class: AppBundle\Manager\TypePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - 
                product:
                    new: '%prestashop_default_product_new%'
                    on_sale: '%prestashop_default_product_on_sale%'
                category:
                    parent_category_id: '%prestashop_default_product_category_id%'
                    shop_id: '%prestashop_default_category_shop_id%'
                tax_rule_group_id: '%prestashop_default_tax_rule_group_id%' 
            - "@sync.logger"

    AppBundle\Manager\SaisonPrestashopSyncManager:
        class: AppBundle\Manager\SaisonPrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - product:
                  new: '%prestashop_default_product_new%'
                  on_sale: '%prestashop_default_product_on_sale%'
              category:
                  parent_category_id: '%prestashop_default_product_category_id%'
                  shop_id: '%prestashop_default_category_shop_id%'
              tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"

    AppBundle\Manager\MarquePrestashopSyncManager:
        class: AppBundle\Manager\MarquePrestashopSyncManager
        arguments:
            - '@prestashop.webservice'
            - "@=service('doctrine')"
            - "@validator"
            - product:
                  new: '%prestashop_default_product_new%'
                  on_sale: '%prestashop_default_product_on_sale%'
              category:
                  parent_category_id: '%prestashop_default_product_category_id%'
                  shop_id: '%prestashop_default_category_shop_id%'
              tax_rule_group_id: '%prestashop_default_tax_rule_group_id%'
            - "@sync.logger"
            
    AppBundle\Command\BotSyncCommand:
        class: AppBundle\Command\BotSyncCommand
        tags: 
            - { name: 'console.command' }
        autowire: true

    AppBundle\Command\BotSyncStocksCommand:
        class: AppBundle\Command\BotSyncStocksCommand
        tags:
            - { name: 'console.command' }
        autowire: true
            
    AppBundle\Command\SendLogsCommand:
        class: AppBundle\Command\SendLogsCommand
        tags: 
            - { name: 'console.command' }
        arguments:
            - "@=service('doctrine')"
            - "@validator"
            
    AppBundle\Command\AddLogCommand:
        class: AppBundle\Command\AddLogCommand
        tags:
            - { name: 'console.command' }
        arguments:
            - "@sync.logger"
            - "@=service('doctrine')"
    AppBundle\Command\ResetDataCommand:
        class: AppBundle\Command\ResetDataCommand
        tags:
            - { name: 'console.command' }
        arguments:
            - "@sync.logger"
            - "@=service('doctrine')"
