public static function toNQuads($dataset) {
    $quads = array();
    foreach($dataset as $graph_name => $triples) {
      foreach($triples as $triple) {
        if($graph_name === '@default') {
          $graph_name = null;
        }
        $quads[] = self::toNQuad($triple, $graph_name);
      }
    }
    sort($quads);
    return implode($quads);
  }
public static function toNQuads($dataset) {
    $quads = array();
    foreach($dataset as $graph_name => $triples) {
      foreach($triples as $triple) {
        if($graph_name === '@default') {
          $graph_name = null;
        }
        $quads[] = self::toNQuad($triple, $graph_name);
      }
    }
    sort($quads);
    return implode($quads);
  }
public static function toNQuads ( $ dataset ) { $ quads = array ( ) ; foreach ( $ dataset as $ graph_name => $ triples ) { foreach ( $ triples as $ triple ) { if ( $ graph_name === '@default' ) { $ graph_name = null ; } $ quads [ ] = self :: toNQuad ( $ triple , $ graph_name ) ; } } sort ( $ quads ) ; return implode ( $ quads ) ; }
Converts an RDF dataset to N-Quads.

@param stdClass $dataset the RDF dataset to convert.

@return string the N-Quads string.
Converts an RDF dataset to N - Quads .