Commit d037c55e authored by webchick's avatar webchick

Issue #1875818 by Berdir: Update composer.json to use the latest stable 3.0.x version of Guzzle.

parent 8da49651
......@@ -13,10 +13,10 @@
"symfony/yaml": "<2.4",
"twig/twig": "1.*@stable",
"doctrine/common": "2.3.*@stable",
"guzzle/http": "*",
"guzzle/http": "3.1.*@stable",
"kriswallsmith/assetic": "1.1.*@alpha",
"symfony-cmf/routing": "1.0.*@dev",
"njh/easyrdf": "0.8.*"
"easyrdf/easyrdf": "dev-master"
},
"minimum-stability": "dev"
}
This diff is collapsed.
......@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit4f0cafaacf65c45167c785b9f087e425::getLoader();
return ComposerAutoloaderInitcb954419c7531cdb839507174df5e8bb::getLoader();
......@@ -21,7 +21,7 @@
'Guzzle\\Parser' => $vendorDir . '/guzzle/parser/',
'Guzzle\\Http' => $vendorDir . '/guzzle/http/',
'Guzzle\\Common' => $vendorDir . '/guzzle/common/',
'EasyRdf_' => $vendorDir . '/easyrdf/easyrdf/lib/',
'Doctrine\\Common' => $vendorDir . '/doctrine/common/lib/',
'Assetic' => $vendorDir . '/kriswallsmith/assetic/src/',
'EasyRdf_' => $vendorDir . '/njh/easyrdf/lib/',
);
......@@ -2,7 +2,7 @@
// autoload_real.php generated by Composer
class ComposerAutoloaderInit4f0cafaacf65c45167c785b9f087e425
class ComposerAutoloaderInitcb954419c7531cdb839507174df5e8bb
{
private static $loader;
......@@ -19,9 +19,9 @@ public static function getLoader()
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit4f0cafaacf65c45167c785b9f087e425', 'loadClassLoader'));
spl_autoload_register(array('ComposerAutoloaderInitcb954419c7531cdb839507174df5e8bb', 'loadClassLoader'));
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit4f0cafaacf65c45167c785b9f087e425', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitcb954419c7531cdb839507174df5e8bb', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
......@@ -36,7 +36,7 @@ public static function getLoader()
$loader->addClassMap($classMap);
}
$loader->register();
$loader->register(true);
return $loader;
}
......
This diff is collapsed.
doap.rdf
docs
samicache
lib/arc/
reports
*.tar.gz
vendor
composer.phar
composer.lock
EasyRdf 0.8.0
=============
API changes
-----------
* is_a() has been renamed to isA()
Major new features
------------------
* Now PSR-2 compliant
* Added RDFa parser
Enhancements
------------
Bug Fixes
---------
EasyRdf 0.7.2
=============
Enhancements
------------
* Removed automatic registration of ARC2 and librdf parsers and serialisers
** You must now specifically choose the parser or serialiser
* Refactored `EasyRdf_Literal` with datatypes so that it preserves exact value
* Changed Turtle serialiser to not escape Unicode characters unnecessarily
* Fix for escaping literals objects in Turtle serialiser
* Added a new static function `newAndLoad()` to `EasyRdf_Graph`
* Added setters for each of the components of the URI to the class `EasyRdf_ParsedUri`
* Added option to the converter example, to allow raw output, without any HTML
Bug Fixes
---------
* Fixed broken Redland parser (thanks to Jon Phipps)
* Fix for serialising two bnodes that reference each other in Turtle
* Added support for parsing literals with single quotes in Turtle
* Removed require for EasyRdf/Exception.php
* Fix for serialising `EasyRdf_Literal_DateTime` to Turtle
* Fix for serialising Turtle literals with a shorthand syntax
* Several typo fixes and minor corrections
EasyRdf 0.7.1
=============
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
EasyRdf 0.7.0
=============
API Changes
-----------
* You must now wrap full property URIs in angle brackets
Major new features
------------------
* Added a new pure-PHP Turtle parser
* Added basic property-path support for traversing graphs
* Added support for serialising to the GraphViz dot format (and generating images)
* Added a new class `EasyRdf_ParsedUri` - a RFC3986 compliant URI parser
Enhancements
------------
* The load() function in `EasyRdf_Graph` no-longer takes a $data argument
* The parse() and load() methods, now return the number of triples parsed
* Added count() method to `EasyRdf_Resource` and `EasyRdf_Graph`
* Added localName() method to `EasyRdf_Resource`
* Added htmlLink() method to `EasyRdf_Resource`
* Added methods deleteResource() and deleteLiteral() to `EasyRdf_Graph`
* Added support for guessing the file format based on the file extension
* Performance improvements to built-in serialisers
Environment changes
-------------------
* Added PHP Composer description to the project
* Now properly PSR-0 autoloader compatible
* New minimum version of PHP is 5.2.8
* Changed test suite to require PHPUnit 3.6
* Changed from Phing to GNU Make based build system
* Added automated testing of the examples
Bug Fixes
---------
* Fix for loading https:// URLs
* Fix for storing the value 0 in a `EasyRdf_Graph`
* Fix for HTTP servers that return relative URIs in the Location header
* Fix for Literals with languages in the SPARQL Query Results XML Format
* Fix for SPARQL servers that put extra whitespace into the XML result
* Fix for the httpget.php example in PHP 5.4+
EasyRdf 0.6.3
=============
* Added $graph->parseFile() method.
* Added support for SSL (https) to the built-in HTTP client
* Fixes for HTTP responses with a charset parameter in the Content Type.
* Improved error handling and empty documents in JSON and rapper parsers.
* Added connivence class for xsd:hexBinary literals:
- `EasyRdf_Literal_HexBinary`
* Made EasyRdf more tolerant of 'badly serialised bnodes'
* Fix for SPARQL servers that return charset in the MIME Type.
* Fix for using xml:lang in SPARQL 1.1 Query Results JSON Format
* Changed datetime ISO formatting to use 'Z' instead of +0000 for UTC dateTimes
* Added the namespace for 'The Cert Ontology' to EasyRdf.
EasyRdf 0.6.2
=============
* Bug fix for missing triples in the RDF/XML serialiser.
* Added countTriples() method to `EasyRdf_Graph`.
* Re-factored the mechanism for mapping RDF datatypes to PHP classes.
* Added subclasses of `EasyRdf_Literal` for various XSD datatypes:
- `EasyRdf_Literal_Boolean`
- `EasyRdf_Literal_Date`
- `EasyRdf_Literal_DateTime`
- `EasyRdf_Literal_Decimal`
- `EasyRdf_Literal_Integer`
* Made the Redland based parser write triples directly to `EasyRdf_Graph`
* Added support for datatypes and languages in the `EasyRdf_Parser_Ntriples` parser.
* Fix for parsing XML Literals in RDF/XML
EasyRdf 0.6.1
=============
* Updated API documentation for new classes and methods added in 0.6.0
* Added a description to the top of the source code for each example.
* Changed the generated bnode identifier names from eidXXX to genidXXX.
* Implemented inlining of resources in the RDF/XML serialiser.
* Added new reversePropertyUris() method to `EasyRdf_Graph` and `EasyRdf_Resource`.
* Added addType() and setType() to `EasyRdf_Resource`.
* Added a textarea to the converter example.
* Added support for parsing the json-triples format.
* Renamed `EasyRdf_SparqlClient` to `EasyRdf_Sparql_Client`
* Renamed `EasyRdf_SparqlResult` to `EasyRdf_Sparql_Result`
* Fix for $graph->isEmpty() failing after adding and deleting some triples
* Added new `EasyRdf_DatatypeMapper` class that allows you to map RDF datatypes to PHP classes.
* Renamed guessDatatype() to getDatatypeForValue() in `EasyRdf_Literal`.
* Added getResource() and allResources() to `EasyRdf_Graph` and `EasyRdf_Resource`
* Implemented value casting in literals based on the datatype.
EasyRdf 0.6.0
=============
* Major re-factor of the way data is stored internally in `EasyRdf_Graph`.
* Parsing and serialising is now much faster and will enable further optimisations.
* API is mostly backwards-compatible apart from:
- Changed inverse property operator from - to ^ to match Sparql 1.1 property paths.
- New `EasyRdf_Graphs` will not automatically be loaded on creation
You must now call $graph->load();
- Setting the default HTTP client is now part of a new `EasyRdf_Http` class
- It is no-longer possible to add multiple properties at once using an associative array.
* Added methods to `EasyRdf_Graph` for direct manipulation of triples.
* Added new `EasyRdf_GraphStore` - class for fetching, saving and deleting graphs to a Graph Store over HTTP.
* Added new `EasyRdf_SparqlClient` and `EasyRdf_SparqlResult` - class for querying a SPARQL endpoint over HTTP.
* Added q values for each Mime-Type associated with an `EasyRdf_Format`.
* New example demonstrating integration with the Zend Framework.
* New `EasyRdf_HTTP_MockClient` class makes testing easier.
EasyRdf 0.5.2
=============
* Added a built-in RDF/XML parser
* Made the RDF/XML serialiser use the rdf:type to open tags
* Added support for comments in the N-Triples parser
* Added new resolveUriReference() function to `EasyRdf_Utils`
* Added the application/rdf+json and text/rdf+n3 mime types
EasyRdf 0.5.1
=============
* Bug fixes for PHP 5.2
EasyRdf 0.5.0
=============
* Added support for inverse properties.
* Updated RDF/XML and Turtle serialisers to create new namespaces if possible.
* Added new is_a($type) method to `EasyRdf_Resource`.
* Added support for passing an array of properties to the get() method.
* Added primaryTopic() method to `EasyRdf_Resource`.
* The function label() in `EasyRdf_Resource` will no longer attempted to shorten the URI,
if there is no label available.
* Resource types are now stored as resources, instead of shortened URIs.
* Added support for deleting a specific value for property to `EasyRdf_Resource`.
* Properties and datatypes are now stored as full URIs and not
converted to qnames during import.
* Change the TypeMapper to store full URIs internally.
* Added bibo and geo to the set of default namespaces.
* Improved bnode links in dump format
* Fix for converting non-string `EasyRdf_Literal` to string.
* Created an example that resolves UK postcodes using uk-postcodes.com.
EasyRdf 0.4.0
=============
* Moved source code to Github
* Added an `EasyRdf_Literal` class
* Added proper support for Datatypes and Languages
* Added built-in RDF/XML serialiser
* Added built-in Turtle serialiser
* Added a new `EasyRdf_Format` class to deal with mime types etc.
* finished a major refactoring of the Parser/Serialiser registration
* removed all parsing related code from `EasyRdf_Graph`
* Added a basic serialisation example
* Added additional common namespaces
* Test fixes
EasyRdf 0.3.0
=============
* Generated Wiki pages from phpdoc
* Filtering of literals by language
* Moved parsers into `EasyRdf_Parser_XXX` namespace
* Added support for serialisation
* Wrote RDF generation example (foafmaker.php)
* Added built-in ntriples parser/generator
* Added built-in RDF/PHP serialiser
* Added built-in RDF/JSON serialiser
* Added SKOS and RSS to the set of default namespaces.
EasyRdf 0.2.0
=============
* Added support for Redland PHP bindings
* Added support for n-triples document type.
* Improved blank node handing and added newBNode() method to `EasyRdf_Graph`.
* Add option to `EasyRdf_RapperParser` to choose location of rapper command
* Added Rails style HTML tag helpers to examples to make them simpler
EasyRdf 0.1.0
=============
* First public release
* Support for ARC2 and Rapper
* Built-in HTTP Client
* API Documentation
* PHP Unit tests for every class.
* Several usage examples
LICENSE
=======
Copyright (c) 2009-2011 Nicholas J Humfrey. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* The name of the author 'Nicholas J Humfrey" may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
PACKAGE = easyrdf
VERSION = $(shell php -r "print json_decode(file_get_contents('composer.json'))->version;")
distdir = $(PACKAGE)-$(VERSION)
PHP = $(shell which php)
COMPOSER_FLAGS=--no-ansi --no-interaction
PHPUNIT = vendor/bin/phpunit
PHPUNIT_FLAGS = -c config/phpunit.xml
PHPCS = vendor/bin/phpcs
PHPCS_FLAGS = --standard=./config/phpcs_ruleset.xml --encoding=utf8 --extensions=php
SAMI = vendor/bin/sami.php
EXAMPLE_FILES = examples/*.php
SOURCE_FILES = lib/EasyRdf.php \
lib/EasyRdf/*.php \
lib/EasyRdf/*/*.php
TEST_FILES = test/*/*Test.php \
test/*/*/*Test.php
TEST_SUPPORT = Makefile test/cli_example_wrapper.php \
test/TestHelper.php \
test/EasyRdf/TestCase.php \
test/EasyRdf/Http/MockClient.php \
test/EasyRdf/Serialiser/NtriplesArray.php \
test/fixtures/*
DOC_FILES = composer.json \
doap.rdf \
docs/api \
README.md \
LICENSE.md \
CHANGELOG.md
DISTFILES = $(EXAMPLE_FILES) $(SOURCE_FILES) $(TEST_FILES) \
$(TEST_SUPPORT) $(DOC_FILES)
.DEFAULT: help
all: help
# TARGET:test Run all the PHPUnit tests
.PHONY: test
test: $(PHPUNIT)
mkdir -p reports
$(PHP) $(PHPUNIT) $(PHPUNIT_FLAGS)
# TARGET:test-examples Run PHPUnit tests for each of the examples
.PHONY: test-examples
test-examples: $(PHPUNIT)
mkdir -p reports
$(PHP) $(PHPUNIT) $(PHPUNIT_FLAGS) --testsuite "EasyRdf Examples"
# TARGET:test-lib Run PHPUnit tests for the library
.PHONY: test-lib
test-lib: $(PHPUNIT)
mkdir -p reports
$(PHP) $(PHPUNIT) $(PHPUNIT_FLAGS) --testsuite "EasyRdf Library"
# TARGET:coverage Run the library tests and generate a code coverage report
.PHONY: coverage
coverage: $(PHPUNIT)
mkdir -p reports/coverage
$(PHP) $(PHPUNIT) $(PHPUNIT_FLAGS) --coverage-html ./reports/coverage --testsuite "EasyRdf Library"
# TARGET:apidocs Generate HTML API documentation
.PHONY: apidocs
apidocs: $(SAMI)
$(PHP) $(SAMI) update config/sami.php -n -v --force
docs/api: apidocs
doap.rdf: doap.php composer.json
$(PHP) doap.php > doap.rdf
# TARGET:cs Check the code style of the PHP source code
.PHONY: cs
cs: $(PHPCS)
$(PHPCS) $(PHPCS_FLAGS) lib test
# TARGET:lint Perform basic PHP syntax check on all files
.PHONY: lint
lint: $(EXAMPLE_FILES) $(SOURCE_FILES) $(TEST_FILES)
@for file in $^; do \
$(PHP) -l $$file || exit -1; \
done
# TARGET:dist Build tarball for distribution
.PHONY: dist
dist: $(distdir)
tar zcf $(distdir).tar.gz $(distdir)
rm -Rf $(distdir)
@echo "Created $(distdir).tar.gz"
$(distdir): $(DISTFILES)
@for file in $^; do \
dir=$(distdir)/`dirname "$$file"`; \
test -d "$$dir" || mkdir -p "$$dir" || exit -1; \
cp -Rfp "$$file" "$(distdir)/$$file" || exit -1; \
done
# TARGET:clean Delete any temporary and generated files
.PHONY: clean
clean:
-rm -Rf $(distdir) reports vendor
-rm -Rf docs/api samicache
-rm -f composer.phar composer.lock
-rm -f doap.rdf
# TARGET:check-fixme Scan for files containing the words TODO or FIXME
.PHONY: check-fixme
check-fixme:
@git grep -n -E 'FIXME|TODO' || echo "No FIXME or TODO lines found."
# TARGET:help You're looking at it!
.PHONY: help
help:
# Usage:
# make <target> [OPTION=value]
#
# Targets:
@egrep "^# TARGET:" [Mm]akefile | sed 's/^# TARGET:/# /'
#
# Options:
# PHP Path to php
# Composer rules
composer.phar:
curl -s -z composer.phar -o composer.phar http://getcomposer.org/composer.phar
composer-install: composer.phar
$(PHP) composer.phar $(COMPOSER_FLAGS) install --dev
composer-update: clean composer.phar
$(PHP) composer.phar $(COMPOSER_FLAGS) update --dev
vendor/bin/phpunit: composer-install
vendor/bin/phpcs: composer-install
vendor/bin/sami.php: composer-install
EasyRdf
=======
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 and has been tested
extensively using PHPUnit.
After 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. Dump methods are available to
inspect what data is available during development.
Data is typically loaded into a [EasyRdf_Graph] object from source RDF
documents, loaded from the web via HTTP. The [EasyRdf_GraphStore] class
simplifies loading and saving data to a SPARQL 1.1 Graph Store.
SPARQL queries can be made over HTTP to a Triplestore using the
[EasyRdf_Sparql_Client] class. SELECT and ASK queries will return an
[EasyRdf_Sparql_Result] object and CONSTRUCT and DESCRIBE queries will return
an [EasyRdf_Graph] object.
### Example ###
$foaf = new EasyRdf_Graph("http://njh.me/foaf.rdf");
$foaf->load();
$me = $foaf->primaryTopic();
echo "My name is: ".$me->get('foaf:name')."\n";
Downloads
---------
The latest version of EasyRdf can be [downloaded from GitHub].
Links
-----
* [EasyRdf Homepage](http://www.easyrdf.org/)
* [API documentation](http://www.easyrdf.org/docs/api/)
* [Change Log](http://github.com/njh/easyrdf/blob/master/CHANGELOG.md)
* Source Code: <http://github.com/njh/easyrdf>
* Issue Tracker: <http://github.com/njh/easyrdf/issues>
Requirements
------------
* PHP 5.2.8 or higher
Features
--------
* API documentation written in phpdoc
* 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 Zend Framework 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]
* Comes with a number of examples
Property Paths
--------------
EasyRdf supports querying the data in a graph using basic property paths.
This is a small subset of the property paths described in [SPARQL 1.1 query language].
You may use the caret character (^) to get an inverse property, for example:
$person = $homepage->get('^foaf:homepage');
You can use the pipe character (|) to get alternate properties, for example:
$title = $document->get('dc:title|dc11:title');
You can use a forward slash (/) to follow a property sequence, for example to get
the names of all my friends:
$names = $me->all('foaf:knows/foaf:name');
Finally, in order to use a full property URI, enclose it in angle brackets:
$name = $me->get('<http://xmlns.com/foaf/0.1/name>');
More Examples
-------------
* [artistinfo.php](https://github.com/njh/easyrdf/blob/master/examples/artistinfo.php#slider) - Example of mapping an RDF class type to a PHP Class
* [basic.php](https://github.com/njh/easyrdf/blob/master/examples/basic.php#slider) - Basic "Hello World" type example
* [basic_sparql.php](https://github.com/njh/easyrdf/blob/master/examples/basic_sparql.php#slider) - Example of making a SPARQL SELECT query
* [converter.php](https://github.com/njh/easyrdf/blob/master/examples/converter.php#slider) - Convert RDF from one format to another
* [dump.php](https://github.com/njh/easyrdf/blob/master/examples/dump.php#slider) - Display the contents of a graph
* [foafinfo.php](https://github.com/njh/easyrdf/blob/master/examples/foafinfo.php#slider) - Display the basic information in a FOAF document
* [foafmaker.php](https://github.com/njh/easyrdf/blob/master/examples/foafmaker.php#slider) - Construct a FOAF document with a choice of serialisations
* [graph_direct.php](https://github.com/njh/easyrdf/blob/master/examples/graph_direct.php#slider) - Example of using EasyRdf_Graph directly without EasyRdf_Resource
* [graphstore.php](https://github.com/njh/easyrdf/blob/master/examples/graphstore.php#slider) - Store and retrieve data from a SPARQL 1.1 Graph Store
* [graphviz.php](https://github.com/njh/easyrdf/blob/master/examples/graphviz.php#slider) - GraphViz rendering example
* [html_tag_helpers.php](https://github.com/njh/easyrdf/blob/master/examples/html_tag_helpers.php#slider) - Rails Style html tag helpers to make the EasyRdf examples simplier
* [httpget.php](https://github.com/njh/easyrdf/blob/master/examples/httpget.php#slider) - No RDF, just test EasyRdf_Http_Client
* [serialise.php](https://github.com/njh/easyrdf/blob/master/examples/serialise.php#slider) - Basic serialisation example
* [sparql_queryform.php](https://github.com/njh/easyrdf/blob/master/examples/sparql_queryform.php#slider) - Form to submit SPARQL queries and display the result
* [uk_postcode.php](https://github.com/njh/easyrdf/blob/master/examples/uk_postcode.php#slider) - Example of resolving UK postcodes using uk-postcodes.com
* [villages.php](https://github.com/njh/easyrdf/blob/master/examples/villages.php#slider) - Fetch and information about villages in Fife from dbpedialite.org
* [zend_framework.php](https://github.com/njh/easyrdf/blob/master/examples/zend_framework.php#slider) - Example of using Zend_Http_Client and Zend_Loader_Autoloader with EasyRdf
Licensing
---------
The EasyRdf library and tests are licensed under the [BSD-3-Clause] license.
The examples are in the public domain, for more information see [UNLICENSE].
[EasyRdf_Graph]:http://www.easyrdf.org/docs/api/EasyRdf_Graph.html
[EasyRdf_GraphStore]:http://www.easyrdf.org/docs/api/EasyRdf_GraphStore.html
[EasyRdf_Sparql_Client]:http://www.easyrdf.org/docs/api/EasyRdf_Sparql_Client.html
[EasyRdf_Sparql_Result]:http://www.easyrdf.org/docs/api/EasyRdf_Sparql_Result.html
[ARC2]:http://github.com/semsol/arc2/
[BSD-3-Clause]:http://www.opensource.org/licenses/BSD-3-Clause
[downloaded from github]:https://github.com/njh/easyrdf/downloads
[GraphViz]:http://www.graphviz.org/
[rapper]:http://librdf.org/raptor/rapper.html
[RDF]:http://en.wikipedia.org/wiki/Resource_Description_Framework
[Redland Bindings]:http://librdf.org/bindings/
[SPARQL 1.1 query language]:http://www.w3.org/TR/sparql11-query/
[UNLICENSE]:http://unlicense.org/
[Zend_Http_Client]:http://framework.zend.com/manual/en/zend.http.client.html
{
"name": "easyrdf/easyrdf",
"description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.",
"version": "0.8.0",
"type": "library",
"keywords": ["RDF", "Semantic Web", "Linked Data", "Turtle", "RDFa"],
"homepage": "http://www.easyrdf.org/",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Nicholas Humfrey",
"email": "njh@aelius.com",
"homepage": "http://www.aelius.com/njh/",
"role": "Developer"
}
],
"support": {
"forum": "http://groups.google.com/group/easyrdf/",
"issues": "http://github.com/njh/easyrdf/issues",
"irc": "irc://chat.freenode.net/easyrdf"
},
"require": {
"php": ">=5.2.8"
},
"require-dev": {
"phpunit/PHPUnit": ">=3.5.15",
"squizlabs/php_codesniffer": ">=1.4.3",
"sami/sami": "dev-master"
},
"replace": {
"njh/easyrdf": "self.version"
},
"autoload": {
"psr-0": { "EasyRdf_": "lib/" }
}
}
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . './lib/');
require_once "EasyRdf.php";
// Load some properties from the composer file
$composer = json_decode(file_get_contents('composer.json'));
// Start building up a RDF graph
$doap = new EasyRdf_Graph($composer->homepage.'doap.rdf');
$easyrdf = $doap->resource('#easyrdf', 'doap:Project', 'foaf:Project');
$easyrdf->addLiteral('doap:name', 'EasyRDF');
$easyrdf->addLiteral('doap:shortname', 'easyrdf');
$easyrdf->addLiteral('doap:revision', $composer->version);
$easyrdf->addLiteral('doap:shortdesc', $composer->description, 'en');
$easyrdf->addResource('doap:homepage', $composer->homepage);
$easyrdf->addLiteral('doap:programming-language', 'PHP');
$easyrdf->addLiteral(
'doap:description', '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 and has been tested extensively using PHPUnit.', 'en'
);
$easyrdf->addResource('doap:license', 'http://usefulinc.com/doap/licenses/bsd');
$easyrdf->addResource('doap:download-page', 'http://github.com/njh/easyrdf/downloads');
$easyrdf->addResource('doap:download-page', 'http://github.com/njh/easyrdf/downloads');
$easyrdf->addResource('doap:bug-database', 'http://github.com/njh/easyrdf/issues');
$easyrdf->addResource('doap:mailing-list', 'http://groups.google.com/group/easyrdf');
$easyrdf->addResource('doap:category', 'http://dbpedia.org/resource/Resource_Description_Framework');
$easyrdf->addResource('doap:category', 'http://dbpedia.org/resource/PHP');
$easyrdf->addResource('doap:category', 'http://dbpedialite.org/things/24131#id');
$easyrdf->addResource('doap:category', 'http://dbpedialite.org/things/53847#id');
$repository = $doap->newBNode('doap:GitRepository');
$repository->addResource('doap:browse', 'http://github.com/njh/easyrdf');
$repository->addResource('doap:location', 'git://github.com/njh/easyrdf.git');
$easyrdf->addResource('doap:repository', $repository);
$njh = $doap->resource('http://njh.me/', 'foaf:Person');
$njh->addLiteral('foaf:name', 'Nicholas J Humfrey');
$njh->addResource('foaf:homepage', 'http://www.aelius.com/njh/');
$easyrdf->add('doap:maintainer', $njh);
$easyrdf->add('doap:developer', $njh);
$easyrdf->add('foaf:maker', $njh);