6.0.0-git
2019-03-21

[#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 (at) horde (dot) org
Created 2008-02-18 (4049 days ago)
Due
Updated
Assigned
Resolved
Milestone
Patch No

History
2008-02-18 22:30:28 Chuck Hagenbuch Comment #1
Type ⇒ Enhancement
State ⇒ Accepted
Priority ⇒ 1. Low
Summary ⇒ Support YAML literal documents
Queue ⇒ Horde Framework Packages
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));


Saved Queries