Rapper
class Rapper extends 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.
Properties
| protected | $prefixes | from Serialiser |
Methods
Check and cleanup parameters passed to serialise() method
Protected method to get the number of reverse properties for a resource If a resource only has a single property, the number of values for that property is returned instead.
Constructor
Details
in
Serialiser at line 54
protected
addPrefix($qname)
Keep track of the prefixes used while serialising
in
Serialiser at line 64
protected
checkSerialiseParams($format)
Check and cleanup parameters passed to serialise() method
in
Serialiser at line 85
protected
reversePropertyCount($resource)
Protected method to get the number of reverse properties for a resource If a resource only has a single property, the number of values for that property is returned instead.
at line 86
string
serialise(Graph $graph, Format|string $format, array $options = array())
Serialise an EasyRdf\Graph to the RDF format of choice.
in
Ntriples at line 57
protected
escapeString($str)
in
Ntriples at line 78
protected
unicodeCharNo($cUtf)
in
Ntriples at line 108
protected
escapedChar($c)
in
Ntriples at line 147
protected
serialiseResource($res)
in
Ntriples at line 169
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 EasyRdf\Literal or EasyRdf\Resource object.
at line 63
__construct(string $rapperCmd = 'rapper')
Constructor