yml_reference.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. xml_attribute: true
  22. inline: true
  23. read_only: true
  24. xml_list:
  25. inline: true
  26. entry_name: foo
  27. xml_map:
  28. inline: true
  29. key_attribute_name: foo
  30. entry_name: bar
  31. callback_methods:
  32. pre_serialize: [foo, bar]
  33. post_serialize: [foo, bar]
  34. post_deserialize: [foo, bar]