Purtle
Fast streaming RDF serializer for PHP
|
Purtle is a fast, lightweight RDF generator. It provides a "fluent" interface for generating RDF output in Turtle, JSON-LD, XML/RDF or N-Triples. The fluent interface allows the resulting PHP code to be structured just like Turtle notation for RDF, hence the name: "Purtle" is a contraction of "PHP Turtle".
The concrete classes implementing the common RdfWriter
interface are:
TurtleRdfWriter
outputs TurtleJsonLdRdfWriter
outputs JSON-LDXmlRdfWriter
outputs XML/RDFNTriplesRdfWriter
outputs N-TriplesThe PHP code would look something like this: