EasyRdf is a PHP library designed to make it easy to consume and produce RDF. It was designed for use in mixed teams of experienced and inexperienced RDF developers. It is written in Object Oriented PHP.
During parsing EasyRdf builds up a graph of PHP objects that can then be walked around to get the data to be placed on the page.
Data is typically loaded into a EasyRdf_Graph object from source RDF documents. The source document could either be an RDF file on the web or the output of a Construct or Describe SPARQL query from a triplestore.
Example
$foaf = new EasyRdf_Graph("http://www.aelius.com/njh/foaf.rdf");
$me = $foaf->primaryTopic();
echo "My name is: ".$me->get('foaf_name')."
";
Product's homepage
Here are some key features of "EasyRdf":
· API documentation written in phpdoc
· Unit tests written using phpunit
· Choice of RDF parser
· Built-in: RDF/JSON
· ARC2: RDF/XML, Turtle, RSS, microformats, eRDF, RDFa, ...
· rapper: RDF/XML, N-Triples, Turtle, TriG, RSS Tag Soup, GRDDL, RDFa
· Optional support for Zend_Http_Client
· No required external dependancies upon other libraries (PEAR, Zend, etc...)
· Complies with Zend Framework coding style.
· Type mapper - resources of type foaf:Person can be mapped into PHP object of class Foaf_Person
· Comes with a number of examples
Requirements:
· PHP
What's New in This Release: [ read full changelog ]
Enhancements:
· Changed minimum version of PHPUnit to 3.5.15
· Added RDFa namespace
· Added Open Graph Protocol namespace
· Made improvements to formatting of the Turtle serialiser
· Added new splitUri() function to EasyRdf_Namespace
· Made improvements to format guessing
Bug Fixes:
· Fix for RDF/XML parser not returning the number of triples
· Added re-mapping of b-nodes to N-Triples and Redland parsers