[SPIP] +version 3.0.7
[ptitvelo/web/www.git] / www / plugins-dist / textwheel / inc / yaml-mini.php
diff --git a/www/plugins-dist/textwheel/inc/yaml-mini.php b/www/plugins-dist/textwheel/inc/yaml-mini.php
new file mode 100644 (file)
index 0000000..acce627
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+# yaml_decode
+
+function yaml_decode($input) {
+       require_once dirname(__FILE__).'/../lib/yaml/sfYaml.php';
+       require_once dirname(__FILE__).'/../lib/yaml/sfYamlParser.php';
+
+       $yaml = new sfYamlParser();
+
+       try
+       {
+         return $yaml->parse($input);
+         
+       }
+       catch (Exception $e)
+       {
+               return null;
+       }
+}
+
+?>
\ No newline at end of file