Skip to content

Commit

Permalink
getProperties implementation. Refs midgardprojectgh-151
Browse files Browse the repository at this point in the history
  • Loading branch information
piotras committed Jan 22, 2013
1 parent 1afc23f commit 669c028
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/Midgard/PHPCR/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,13 +604,14 @@ public function getProperties($absPaths)
throws \PHPCR\RepositoryException("Expected argument should be array");
}

$properties = new \ArrayIterator();

foreach ($absPath as $absPaths) {
$node = $this->getNode($absPath);
$properties = array_merge($properties, $node->getProperties());
$properties = array();
foreach ($absPaths as $absPath) {
try {
$properties[$absPath] = $this->getItem($absPath);
} catch (\PHPCR\PathNotFoundException $e) {
/* Seems like this should be ignored ? */
}
}

return $properties;
return new \ArrayIterator($properties);
}
}

0 comments on commit 669c028

Please sign in to comment.