<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="validator.class">Symfony\Component\Validator\Validator</parameter>
        <parameter key="validator.mapping.class_metadata_factory.class">Symfony\Component\Validator\Mapping\ClassMetadataFactory</parameter>
        <parameter key="validator.mapping.cache.apc.class">Symfony\Component\Validator\Mapping\Cache\ApcCache</parameter>
        <parameter key="validator.mapping.cache.prefix" />
        <parameter key="validator.mapping.loader.loader_chain.class">Symfony\Component\Validator\Mapping\Loader\LoaderChain</parameter>
        <parameter key="validator.mapping.loader.static_method_loader.class">Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader</parameter>
        <parameter key="validator.mapping.loader.annotation_loader.class">Symfony\Component\Validator\Mapping\Loader\AnnotationLoader</parameter>
        <parameter key="validator.mapping.loader.xml_files_loader.class">Symfony\Component\Validator\Mapping\Loader\XmlFilesLoader</parameter>
        <parameter key="validator.mapping.loader.yaml_files_loader.class">Symfony\Component\Validator\Mapping\Loader\YamlFilesLoader</parameter>
        <parameter key="validator.validator_factory.class">Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory</parameter>
        <parameter key="validator.mapping.loader.xml_files_loader.mapping_files" type="collection" />
        <parameter key="validator.mapping.loader.yaml_files_loader.mapping_files" type="collection" />
    </parameters>

    <services>
        <service id="validator" class="%validator.class%">
            <argument type="service" id="validator.mapping.class_metadata_factory" />
            <argument type="service" id="validator.validator_factory" />
            <argument type="collection" />
        </service>

        <service id="validator.mapping.class_metadata_factory" class="%validator.mapping.class_metadata_factory.class%" public="false">
            <argument type="service" id="validator.mapping.loader.loader_chain" />
            <argument>null</argument>
        </service>

        <service id="validator.mapping.cache.apc" class="%validator.mapping.cache.apc.class%" public="false">
            <argument>%validator.mapping.cache.prefix%</argument>
        </service>

        <service id="validator.validator_factory" class="%validator.validator_factory.class%" public="false">
            <argument type="service" id="service_container" />
            <argument type="collection" />
        </service>

        <service id="validator.mapping.loader.loader_chain" class="%validator.mapping.loader.loader_chain.class%" public="false">
            <argument type="collection">
                <argument type="service" id="validator.mapping.loader.static_method_loader" />
                <argument type="service" id="validator.mapping.loader.xml_files_loader" />
                <argument type="service" id="validator.mapping.loader.yaml_files_loader" />
            </argument>
        </service>

        <service id="validator.mapping.loader.static_method_loader" class="%validator.mapping.loader.static_method_loader.class%" public="false" />

        <service id="validator.mapping.loader.annotation_loader" class="%validator.mapping.loader.annotation_loader.class%" public="false">
            <argument type="service" id="annotation_reader" />
        </service>

        <service id="validator.mapping.loader.xml_files_loader" class="%validator.mapping.loader.xml_files_loader.class%" public="false">
            <argument>%validator.mapping.loader.xml_files_loader.mapping_files%</argument>
        </service>

        <service id="validator.mapping.loader.yaml_files_loader" class="%validator.mapping.loader.yaml_files_loader.class%" public="false">
            <argument>%validator.mapping.loader.yaml_files_loader.mapping_files%</argument>
        </service>
    </services>
</container>
