parameters:
    ezpublish.kernel.root_dir: %kernel.root_dir%/../vendor/ezsystems/ezpublish-kernel

    # API
    ezpublish.api.repository.factory.class: eZ\Bundle\EzPublishCoreBundle\ApiLoader\RepositoryFactory
    ezpublish.api.repository.lazy_factory.class: eZ\Bundle\EzPublishCoreBundle\ApiLoader\LazyRepositoryFactory
    ezpublish.api.storage_engine.factory.class: eZ\Bundle\EzPublishCoreBundle\ApiLoader\StorageEngineFactory

    # Symfony event converter Slot
    ezpublish.signalslot.event_converter_slot.class: eZ\Bundle\EzPublishCoreBundle\SignalSlot\Slot\SymfonyEventConverterSlot

    # Using legacy storage engine for data compatibility with 4.x
    ezpublish.api.storage_engine.default: legacy

    ezpublish.api.content.class: eZ\Publish\Core\Repository\Values\Content\Content
    ezpublish.api.location.class: eZ\Publish\Core\Repository\Values\Content\Location

services:
    # API
    ezpublish.api.repository.factory:
        class: %ezpublish.api.repository.factory.class%
        arguments:
            - @ezpublish.config.resolver
            - @ezpublish.field_type_collection.factory
            - %ezpublish.api.inner_repository.class%
        calls:
            - [setContainer, [@service_container]]

    # Deprecated
    ezpublish.api.repository.lazy_factory:
        class: %ezpublish.api.repository.lazy_factory.class%
        arguments: [@ezpublish.api.repository]

    # Deprecated
    # Use ezpublish.api.repository lazy service instead
    ezpublish.api.repository.lazy:
        class: Closure
        factory_service: ezpublish.api.repository.lazy_factory
        factory_method: buildRepository

    ezpublish.api.storage_engine.factory:
        class: %ezpublish.api.storage_engine.factory.class%
        arguments:
            - @ezpublish.api.storage_repository_provider

    ezpublish.api.persistence_handler:
        #To disable cache, switch alias to ezpublish.api.storage_engine
        alias: ezpublish.spi.persistence.cache

    ezpublish.api.storage_engine:
        class: %ezpublish.api.storage_engine.class%
        factory_service: ezpublish.api.storage_engine.factory
        factory_method: buildStorageEngine
        public: false

    # Signal Slot API wrapper
    ezpublish.signalslot.event_converter_slot:
        class: %ezpublish.signalslot.event_converter_slot.class%
        arguments: [@event_dispatcher]
        tags:
            - { name: ezpublish.api.slot, signal: '*' }
