Fork me on GitHub

EasyRdf

A PHP library designed to make it easy to consume and produce RDF.

Designed for use in mixed teams of experienced and inexperienced RDF developers. Written in PSR-2 compliant PHP and tested extensively using PHPUnit.

Getting Started »

Example

$foaf = new EasyRdf_Graph("http://njh.me/foaf.rdf");
$foaf->load();
$me = $foaf->primaryTopic();
echo "My name is: ".$me->get('foaf:name')."\n";

Requirements

  • PHP 5.2.8 or newer

Features

  • Extensive unit tests written using PHPUnit
    • Automated testing against PHP 5.2, 5.3 and 5.4
  • Built-in parsers and serialisers: RDF/JSON, N-Triples, RDF/XML, Turtle
  • Optional parsing support for: ARC2, Redland Bindings, rapper
  • Optional support for Zend_Http_Client
  • No required external dependancies upon other libraries (PEAR, Zend, etc...)
  • Complies with the PSR-2 coding style
  • Type mapper - resources of type foaf:Person can be mapped into PHP object of class Foaf_Person
  • Support for visualisation of graphs using GraphViz
  • Composer compatible
  • Comes with a number of examples