Skip to content

Instantly share code, notes, and snippets.

@dmj
Created November 17, 2012 11:14
Show Gist options
  • Save dmj/4095015 to your computer and use it in GitHub Desktop.
Save dmj/4095015 to your computer and use it in GitHub Desktop.
YAML parsers vs. VuFind search specs
============================================================================
HORDE
Array
(
[AllFields] => Array
(
[Variant_1] => Array
(
[series] => Array
(
[0] => Array
(
[0] => onephrase
[1] => 500
)
)
)
[Variant_2] => Array
(
[series] => Array
(
[0] => Array
(
[0] => onephrase
[1] => 500
)
)
)
)
)
============================================================================
SYMFONY
Array
(
[AllFields] => Array
(
[Variant_1] => Array
(
[0] => Array
(
[series] => Array
(
[0] => Array
(
[0] => onephrase
[1] => 500
)
)
)
)
[Variant_2] => Array
(
[series] => Array
(
[0] => Array
(
[0] => onephrase
[1] => 500
)
)
)
)
)
<?php
require_once('psr0.autoloader.php');
$horde = Horde_Yaml::loadFile("test.yaml");
$symf = Symfony\Component\Yaml\Yaml::parse("test.yaml");
echo "============================================================================\n";
echo "HORDE\n\n";
print_r($horde);
echo "============================================================================\n";
echo "SYMFONY\n\n";
print_r($symf);
---
AllFields:
Variant_1:
- series:
- [onephrase, 500]
Variant_2:
series:
- [onephrase, 500]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment