Sort RDF statement output.
This commit is contained in:
parent
566991cb47
commit
18e2934981
|
@ -483,11 +483,12 @@ class JsonLdProcessor {
|
||||||
if(isset($options['format'])) {
|
if(isset($options['format'])) {
|
||||||
// supported formats
|
// supported formats
|
||||||
if($options['format'] === 'application/nquads') {
|
if($options['format'] === 'application/nquads') {
|
||||||
$nquads = '';
|
$nquads = array();
|
||||||
foreach($statements as $statement) {
|
foreach($statements as $statement) {
|
||||||
$nquads .= $this->_toNQuad($statement);
|
$nquads[] = $this->_toNQuad($statement);
|
||||||
}
|
}
|
||||||
$statements = $nquads;
|
sort($nquads);
|
||||||
|
$statements = implode($nquads);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new JsonLdException(
|
throw new JsonLdException(
|
||||||
|
|
Loading…
Reference in a new issue