[#6284] Support YAML literal documents
Summary Support YAML literal documents
Queue Horde Framework Packages
Queue Version HEAD
Type Enhancement
State Accepted
Priority 1. Low
Owners
Requester Chuck Hagenbuch <chuck (at) horde (dot) org>
Created 02/18/2008 (84 days ago)
Due
Updated
Assigned
Resolved
Attachments
Milestone
Patch

History
02/18/2008 Chuck Hagenbuch Comment #1
Queue ⇒ Horde Framework Packages
Summary ⇒ Support YAML literal documents
Type ⇒ Enhancement
Priority ⇒ 1. Low
State ⇒ Accepted
Reply to this comment
Explanation from Alexei Zakhlestin:

I noticed, that you limit yaml-documents only to the ones which provide arrays, which is not always true. yaml-document can consist of the single literal (string, null, number, etc) and still be valid. Currently, whenever syck_load() returns anything but array, you force result to be empty array().

Simple test-case:

<?php

require 'Horde/Yaml.php';

$doc = 'test';

var_dump(syck_load($doc));
var_dump(Horde_Yaml::load($doc));