Sort RDF statement output.

This commit is contained in:
Dave Longley 2012-04-30 22:15:09 -04:00
parent 566991cb47
commit 18e2934981

View file

@ -483,11 +483,12 @@ class JsonLdProcessor {
if(isset($options['format'])) {
// supported formats
if($options['format'] === 'application/nquads') {
$nquads = '';
$nquads = array();
foreach($statements as $statement) {
$nquads .= $this->_toNQuad($statement);
$nquads[] = $this->_toNQuad($statement);
}
$statements = $nquads;
sort($nquads);
$statements = implode($nquads);
}
else {
throw new JsonLdException(