allow <Property> elements in <Link> in XRD

This commit is contained in:
Evan Prodromou 2010-12-07 15:53:08 -05:00
parent d5466ac87e
commit eab8d752e8

View File

@ -130,14 +130,24 @@ class XRD
foreach ($this->links as $link) {
$titles = array();
$properties = array();
if (isset($link['title'])) {
$titles = $link['title'];
unset($link['title']);
}
if (isset($link['property'])) {
$properties = $link['property'];
unset($link['property']);
}
$xs->elementStart('Link', $link);
foreach ($titles as $title) {
$xs->element('Title', null, $title);
}
foreach ($properties as $property) {
$xs->element('Property',
array('type' => $property['type']),
$property['value']);
}
$xs->elementEnd('Link');
}