This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml

92 lines
4.6 KiB
XML
Raw Normal View History

2013-01-20 18:39:49 +00:00
<?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="serializer.mapping.cache.file">%kernel.cache_dir%/serialization.php</parameter>
<parameter key="serializer.mapping.cache.prefix" />
2013-01-20 18:39:49 +00:00
</parameters>
<services>
2015-03-26 12:27:32 +00:00
<service id="serializer" class="Symfony\Component\Serializer\Serializer">
2013-01-20 18:39:49 +00:00
<argument type="collection" />
<argument type="collection" />
</service>
<service id="serializer.property_accessor" alias="property_accessor" public="false" />
<!-- Normalizer -->
<service id="serializer.normalizer.object" class="Symfony\Component\Serializer\Normalizer\ObjectNormalizer" public="false">
<argument type="service" id="serializer.mapping.class_metadata_factory" />
<argument>null</argument> <!-- name converter -->
<argument type="service" id="serializer.property_accessor" />
2016-07-26 15:19:03 +01:00
<argument type="service" id="property_info" on-invalid="ignore" />
<!-- Run after all custom normalizers -->
<tag name="serializer.normalizer" priority="-1000" />
</service>
<service id="serializer.denormalizer.array" class="Symfony\Component\Serializer\Normalizer\ArrayDenormalizer" public="false">
<!-- Run before the object normalizer -->
<tag name="serializer.normalizer" priority="-990" />
</service>
<!-- Loader -->
<service id="serializer.mapping.chain_loader" class="Symfony\Component\Serializer\Mapping\Loader\LoaderChain" public="false">
<argument type="collection" />
</service>
<!-- Class Metadata Factory -->
<service id="serializer.mapping.class_metadata_factory" class="Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory" public="false">
<argument type="service" id="serializer.mapping.chain_loader" />
<argument>null</argument>
</service>
<!-- Cache -->
<service id="serializer.mapping.cache_warmer" class="Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer" public="false">
<argument type="collection" /><!-- Loaders injected by the extension -->
<argument>%serializer.mapping.cache.file%</argument>
<argument type="service" id="cache.serializer" />
<tag name="kernel.cache_warmer" />
</service>
<service id="serializer.mapping.cache.symfony" class="Symfony\Component\Cache\Adapter\PhpArrayAdapter">
<factory class="Symfony\Component\Cache\Adapter\PhpArrayAdapter" method="create" />
<argument>%serializer.mapping.cache.file%</argument>
<argument type="service" id="cache.serializer" />
</service>
<service id="serializer.mapping.cache.doctrine.apc" class="Doctrine\Common\Cache\ApcCache" public="false">
<call method="setNamespace">
<argument>%serializer.mapping.cache.prefix%</argument>
</call>
<deprecated>The "%service_id%" service is deprecated since Symfony 3.2 and will be removed in 4.0. APCu should now be automatically used when available.</deprecated>
</service>
<service id="serializer.mapping.cache.apc" parent="serializer.mapping.cache.doctrine.apc">
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. APCu should now be automatically used when available.</deprecated>
</service>
2013-01-20 18:39:49 +00:00
<!-- Encoders -->
2015-03-26 12:27:32 +00:00
<service id="serializer.encoder.xml" class="Symfony\Component\Serializer\Encoder\XmlEncoder" public="false">
2013-01-20 18:39:49 +00:00
<tag name="serializer.encoder" />
</service>
2015-03-26 12:27:32 +00:00
<service id="serializer.encoder.json" class="Symfony\Component\Serializer\Encoder\JsonEncoder" public="false">
2013-01-20 18:39:49 +00:00
<tag name="serializer.encoder" />
</service>
<!-- Name converter -->
<service id="serializer.name_converter.camel_case_to_snake_case" class="Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter" public="false" />
<!-- PropertyInfo extractor -->
<service id="property_info.serializer_extractor" class="Symfony\Component\PropertyInfo\Extractor\SerializerExtractor" public="false">
<argument type="service" id="serializer.mapping.class_metadata_factory" />
<tag name="property_info.list_extractor" priority="-999" />
</service>
2013-01-20 18:39:49 +00:00
</services>
</container>