Coder Social home page Coder Social logo

liblod-php's Introduction

liblod-php

A Linked Open Data client library for PHP, developed as part of the RES project.

It also works for Linked Data (without the "Open"), but was initially developed for LOD, and the name stuck.

Note that this is experimental code which is still under development.

Requirements

PHP 5.6 or higher (it works under PHP 7, but no features from PHP 7 are used).

Installation

To install this library for use with your own code, do:

composer require bbcarchdev/liblod

Usage

See liblod-php_usage.md (in this directory).

Developing the code

To develop liblod-php, clone the repo:

git clone https://github.com/bbcarchdev/liblod-php.git liblod-php
cd liblod-php

Then you'll need to install the dependencies. You can do this with:

php tools/composer.phar install

Running the tests

To run the unit tests:

./vendor/bin/robo unit

To run the integration tests:

./vendor/bin/robo int

Note that the integration tests work against the live Acropolis stack and other LOD sites, so you will need a network connection to run them. They can also be somewhat fragile, as the number of statements for fetched resources may periodically change, depending on what has been ingested. This can occasionally cause test failures.

Code coverage

To generate a code coverage report for the tests, you will first need to install the XDebug PHP module. Then, run:

./vendor/bin/robo cov

The report can be viewed by opening build/cov/index.html in a web browser.

Code quality

Code quality checks can be run with:

./vendor/bin/robo mess

This uses PHPMD to report on various issues with the code.

API docs

Rudimentary (incomplete) API docs can be generated with:

./vendor/bin/robo docs

The generated docs end up in the build/apidocs/ directory.

Code style checking

The code style can be checked with:

./vendor/bin/robo style

The code style report ends up in the build/style/ directory.

(Note that the code style configuration is in the phpcheckstyle-config.xml file.)

Authors

API design by Mo McRoberts.

Implementation by Elliot Smith.

Contributing

Contributions are welcome via github pull requests.

Please use the github issue tracker to raise issues.

Licence

Elliot Smith, © BBC 2017

liblod-php is licensed under the terms of the Apache License, Version 2.0 (see LICENCE-APACHE.txt).

The liblod-php code base distributes the following software (used during development):

(NB these libraries are distributed with the source because they cause version clashes with dependencies used by the runtime library or are inconvenient to install.)

liblod-php depends on these libraries at runtime (which are licensed as stated); these are not distributed with liblod-php:

liblod-php depends on these libraries for development (which are licensed as stated); these are not distributed with liblod-php:

liblod-php's People

Contributors

townxelliot avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.