yml_reference.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. YAML Reference
  2. --------------
  3. ::
  4. # MyBundle\Resources\config\serializer\ClassName.yml
  5. Fully\Qualified\ClassName:
  6. exclusion_policy: ALL
  7. xml_root_name: foobar
  8. exclude: true
  9. access_type: public_method # defaults to property
  10. accessor_order: custom
  11. custom_accessor_order: [propertyName1, propertyName2, ..., propertyNameN]
  12. properties:
  13. some-property:
  14. exclude: true
  15. expose: true
  16. access_type: public_method # defaults to property
  17. type: string
  18. serialized_name: foo
  19. since_version: 1.0
  20. until_version: 1.1
  21. groups: [foo, bar]
  22. xml_attribute: true
  23. inline: true
  24. read_only: true
  25. xml_key_value_pairs: true
  26. xml_list:
  27. inline: true
  28. entry_name: foo
  29. xml_map:
  30. inline: true
  31. key_attribute_name: foo
  32. entry_name: bar
  33. callback_methods:
  34. pre_serialize: [foo, bar]
  35. post_serialize: [foo, bar]
  36. post_deserialize: [foo, bar]