EasyRdf API Documentation
Class

EasyRdf_Serialiser_Ntriples

class EasyRdf_Serialiser_Ntriples extends EasyRdf_Serialiser

Class to serialise an EasyRdf_Graph to N-Triples with no external dependancies.

Methods

__construct()

from EasyRdf_Serialiser
string serialise(EasyRdf_Graph $graph, string $format, array $options = array())

Serialise an EasyRdf_Graph into N-Triples

string serialiseValue(array|object $value)

Serialise an RDF value into N-Triples

Details

in EasyRdf_Serialiser at line 49
public __construct()

at line 199
public string serialise(EasyRdf_Graph $graph, string $format, array $options = array())

Serialise an EasyRdf_Graph into N-Triples

Parameters

EasyRdf_Graph $graph An EasyRdf_Graph object.
string $format The name of the format to convert to.
array $options

Return Value

string The RDF in the new desired format.

Exceptions

EasyRdf_Exception

at line 164
public string serialiseValue(array|object $value)

Serialise an RDF value into N-Triples

The value can either be an array in RDF/PHP form, or an EasyRdfLiteral or EasyRdfResource object.

Parameters

array|object $value An associative array or an object

Return Value

string The RDF value serialised to N-Triples

Exceptions

EasyRdf_Exception