You are here

sfMergeKey.yml in Service Container 7.2

modules/providers/service_container_symfony/lib/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml

File

modules/providers/service_container_symfony/lib/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml
View source
  1. --- %YAML:1.0
  2. test: Simple In Place Substitution
  3. brief: >
  4. If you want to reuse an entire alias, only overwriting what is different
  5. you can use a << in place substitution. This is not part of the official
  6. YAML spec, but a widely implemented extension. See the following URL for
  7. details: http://yaml.org/type/merge.html
  8. yaml: |
  9. foo: &foo
  10. a: Steve
  11. b: Clark
  12. c: Brian
  13. bar:
  14. a: before
  15. d: other
  16. <<: *foo
  17. b: new
  18. x: Oren
  19. c:
  20. foo: bar
  21. foo: ignore
  22. bar: foo
  23. duplicate:
  24. foo: bar
  25. foo: ignore
  26. foo2: &foo2
  27. a: Ballmer
  28. ding: &dong [ fi, fei, fo, fam]
  29. check:
  30. <<:
  31. - *foo
  32. - *dong
  33. isit: tested
  34. head:
  35. <<: [ *foo , *dong , *foo2 ]
  36. php: |
  37. array(
  38. 'foo' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian'),
  39. 'bar' => array('a' => 'before', 'd' => 'other', 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'x' => 'Oren'),
  40. 'duplicate' => array('foo' => 'bar'),
  41. 'foo2' => array('a' => 'Ballmer'),
  42. 'ding' => array('fi', 'fei', 'fo', 'fam'),
  43. 'check' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'fi', 'fei', 'fo', 'fam', 'isit' => 'tested'),
  44. 'head' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'fi', 'fei', 'fo', 'fam')
  45. )