diff --git a/components/yaml/introduction.rst b/components/yaml/introduction.rst index c61b40fa0e4..529290461e8 100644 --- a/components/yaml/introduction.rst +++ b/components/yaml/introduction.rst @@ -148,6 +148,16 @@ error if something goes wrong by adding the filename to the message. .. _components-yaml-dump: +Objects for Mappings +.................... + +Yaml :ref:`mappings ` are basically associative arrays. You can instruct the parser to return +mappings as objects (i.e. ``\stdClass`` instances):: + + $object = Yaml::parse('{"hello": "world"}', false, false, true); + echo get_class($object); // stdClass + echo $object->hello; // world + Writing YAML Files ~~~~~~~~~~~~~~~~~~ diff --git a/components/yaml/yaml_format.rst b/components/yaml/yaml_format.rst index 0a776be2a70..2e9d24a95ef 100644 --- a/components/yaml/yaml_format.rst +++ b/components/yaml/yaml_format.rst @@ -165,6 +165,8 @@ YAML uses the ISO-8601 standard to express dates: # simple date 2002-12-14 +.. _yaml-format-collections: + Collections -----------