mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
23 lines
No EOL
348 B
PHP
23 lines
No EOL
348 B
PHP
<?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;
|
|
}
|
|
}
|
|
|
|
?>
|