allow <Property> elements in <Link> in XRD
This commit is contained in:
parent
d5466ac87e
commit
eab8d752e8
10
lib/xrd.php
10
lib/xrd.php
@ -130,14 +130,24 @@ class XRD
|
|||||||
|
|
||||||
foreach ($this->links as $link) {
|
foreach ($this->links as $link) {
|
||||||
$titles = array();
|
$titles = array();
|
||||||
|
$properties = array();
|
||||||
if (isset($link['title'])) {
|
if (isset($link['title'])) {
|
||||||
$titles = $link['title'];
|
$titles = $link['title'];
|
||||||
unset($link['title']);
|
unset($link['title']);
|
||||||
}
|
}
|
||||||
|
if (isset($link['property'])) {
|
||||||
|
$properties = $link['property'];
|
||||||
|
unset($link['property']);
|
||||||
|
}
|
||||||
$xs->elementStart('Link', $link);
|
$xs->elementStart('Link', $link);
|
||||||
foreach ($titles as $title) {
|
foreach ($titles as $title) {
|
||||||
$xs->element('Title', null, $title);
|
$xs->element('Title', null, $title);
|
||||||
}
|
}
|
||||||
|
foreach ($properties as $property) {
|
||||||
|
$xs->element('Property',
|
||||||
|
array('type' => $property['type']),
|
||||||
|
$property['value']);
|
||||||
|
}
|
||||||
$xs->elementEnd('Link');
|
$xs->elementEnd('Link');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user