Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
PHP HTML
branch: master

Modifications to the toIcs method, to fix a bug that prevented it fro…

…m working properly
latest commit a3c4f3fd19
Southampton Open Data authored
Failed to load latest commit information.
Graphite updated preg_replace /e to use preg_replace_callback
examples Add examples from http://graphite.ecs.soton.ac.uk/ for easy offline work
tests fixed issue in test based on information here
.gitignore Add Composer package file
.travis.yml Get phpunit coverage out in travis builds
Graphite.php
README Updated build instructions
build.xml Exclude ARC2/other libs from code coverage
bundle_into_single_file.sh
composer.json Replace deprecated /e preg_replace modifier and require PHP 5.3
graphite-docs.html added t() and add() functions
package.xml Merge conflict, minus full merge of 2c2552 and 145173
phpdoc.dist.xml PHPDocumentor2 configuration
phpdox.xml
phpunit.xml Exclude ARC2/other libs from code coverage

README

Graphite is LGPL. 

Graphite is a friendly API for working with graph data (RDF).

Copyright 2010-2012 University of Southampton and Christopher Gutteridge.
Homepage: http://graphite.ecs.soton.ac.uk/
Github: https://github.com/cgutteridge/Graphite

Icons in prettyLink example by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License. http://p.yusukekamiyamane.com/

To use: (see examples for more)
    <?php

    require_once("path/to/arc/ARC2.php");
    require_once("Graphite.php");

    $graph = new Graphite();
    $graph->load( "http://id.ecs.soton.ac.uk/person/1248" );
    $me = $graph->resource( "http://id.ecs.soton.ac.uk/person/1248" );


    print "<h1>".$me->prettyLink()."</h1>";
    print "<p>default, built-in icons.</p>";
    print "<div>".$me->get( "foaf:mbox" )->prettyLink()."</div>";
    print "<div>".$me->get( "foaf:phone" )->prettyLink()."</div>";



    print "<h1>".$me->prettyLink()."</h1>";
    print '<p>The following icons by <a href="http://p.yusukekamiyamane.com/">Yusuke Kamiyamane</a>. All rights reserved. Licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License</a>.</p>';
    $graph->mailtoIcon( "icons/mail.png" );
    $graph->telIcon( "icons/telephone-handset.png" );
    print "<div>".$me->get( "foaf:mbox" )->prettyLink()."</div>";
    print "<div>".$me->get( "foaf:phone" )->prettyLink()."</div>";

# Dev dependencies
$ pear config-set auto_discover 1
$ pear install pear.phpqatools.org/phpqatools pear.netpirates.net/phpDox
$ pear install PEAR_PackageFileManager_Cli

# To test:
$ ant phpunit

To build/prepare a release:
$ pfm
$ ant
Something went wrong with that request. Please try again.