Skip to content

Commit

Permalink
[testing] extended type attributes by vocab and prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
oafx committed Dec 8, 2014
1 parent 3e8859d commit e5ea89b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Midgard/CreatePHP/Metadata/RdfDriverXml.php
Expand Up @@ -88,6 +88,15 @@ public function loadType($name, RdfMapperInterface $mapper, RdfTypeFactory $type
if (isset($xml['typeof'])) {
$type->setRdfType($xml['typeof']);
}

if (isset($xml['vocab'])) {
$type->setAttribute('vocab' , $xml['vocab']);
}

if (isset($xml['prefix'])) {
$type->setAttribute('prefix', $xml['prefix']);
}

$add_default_vocabulary = false;
foreach($xml->children->children() as $child) {
$c = $this->createChild($child->getName(), $child['identifier'], $child, $typeFactory);
Expand Down

0 comments on commit e5ea89b

Please sign in to comment.