EasyRdf API Documentation
Class

EasyRdf_Serialiser_Rapper

class EasyRdf_Serialiser_Rapper extends EasyRdf_Serialiser_Ntriples

Class to serialise an EasyRdf_Graph to RDF using the 'rapper' command line tool.

Note: the built-in N-Triples serialiser is used to pass data to Rapper.

Methods

object __construct(string $rapperCmd = 'rapper')

Constructor

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

Serialise an EasyRdf_Graph to the RDF format of choice.

string serialiseValue(array|object $value)

Serialise an RDF value into N-Triples

from EasyRdf_Serialiser_Ntriples

Details

at line 58
public object __construct(string $rapperCmd = 'rapper')

Constructor

Parameters

string $rapperCmd Optional path to the rapper command to use.

Return Value

object EasyRdfSerialiserRapper

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

Serialise an EasyRdf_Graph to the RDF format of choice.

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.

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