PHPackages                             bbcarchdev/liblod - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bbcarchdev/liblod

ActiveProject[Utility &amp; Helpers](/categories/utility)

bbcarchdev/liblod
=================

A LOD client library.

0.1.1(8y ago)1711Apache-2.0PHP

Since Sep 13Pushed 8y agoCompare

[ Source](https://github.com/bbcarchdev/liblod-php)[ Packagist](https://packagist.org/packages/bbcarchdev/liblod)[ RSS](/packages/bbcarchdev-liblod/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (7)Versions (3)Used By (0)

liblod-php
==========

[](#liblod-php)

A Linked Open Data client library for PHP, developed as part of the [RES project](http://res.space/).

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
------------

[](#requirements)

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

Installation
------------

[](#installation)

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

```
composer require bbcarchdev/liblod

```

Usage
-----

[](#usage)

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

Developing the code
-------------------

[](#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
-----------------

[](#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](http://acropolis.org.uk/) 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
-------------

[](#code-coverage)

To generate a code coverage report for the tests, you will first need to [install the XDebug PHP module](https://xdebug.org/docs/install). 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)

Code quality checks can be run with:

```
./vendor/bin/robo mess

```

This uses [PHPMD](https://phpmd.org/) to report on various issues with the code.

API docs
--------

[](#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
-------------------

[](#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
-------

[](#authors)

API design by [Mo McRoberts](https://github.com/nevali).

Implementation by [Elliot Smith](https://github.com/townxelliot).

Contributing
------------

[](#contributing)

Contributions are welcome via [github pull requests](https://github.com/bbcarchdev/liblod-php).

Please use the [github issue tracker](https://github.com/bbcarchdev/liblod-php/issues) to raise issues.

Licence
-------

[](#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):

- [Composer](http://getcomposer.org/): distributed under the [MIT licence](https://opensource.org/licenses/MIT). See `tools/LICENCE-COMPOSER-MIT.txt` for the full licence.
- [PHPUnit](http://phpunit.de/): distributed under the [3-clause BSD licence](https://opensource.org/licenses/BSD-3-Clause). See `tools/LICENCE-PHPUNIT-BSD3.txt` for the full licence.
- [phpDocumentor](https://www.phpdoc.org/): distributed under the [MIT licence](https://github.com/phpDocumentor/phpDocumentor2/blob/develop/LICENSE). See `tools/LICENCE-PHPDOCUMENTOR-MIT.txt` for the full licence.

(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:

- [pietercolpaert/hardf](https://github.com/pietercolpaert/hardf) - [MIT licence](https://github.com/pietercolpaert/hardf/blob/master/LICENSE)
- [easyrdf/easyrdf](http://easyrdf.org/) - [BSD 3-clause licence](https://github.com/njh/easyrdf/blob/master/LICENSE.md)
- [guzzlehttp/psr7](http://guzzlephp.org/) - [MIT licence](https://github.com/guzzle/guzzle/blob/master/LICENSE)
- [guzzlehttp/guzzle](http://guzzlephp.org/) - [MIT licence](https://github.com/guzzle/guzzle/blob/master/LICENSE)

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

- [consolidation/robo](https://github.com/consolidation/robo) - [MIT licence](https://github.com/consolidation/Robo/blob/master/LICENSE)
- [phpmd/phpmd](https://phpmd.org/) - [BSD 3-clause licence](https://github.com/phpmd/phpmd/blob/master/LICENSE)
- [phpcheckstyle/phpcheckstyle](https://github.com/PHPCheckstyle/phpcheckstyle) - [Open Software Licence](https://github.com/PHPCheckstyle/phpcheckstyle/blob/master/LICENSE.txt)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~137 days

Total

2

Last Release

3076d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5307d24313f823d4066ce1d0ec04fe175487c30515451d051e4d2d0a9eedb19d?d=identicon)[townxelliot](/maintainers/townxelliot)

---

Top Contributors

[![townxelliot](https://avatars.githubusercontent.com/u/83619?v=4)](https://github.com/townxelliot "townxelliot (85 commits)")

### Embed Badge

![Health badge](/badges/bbcarchdev-liblod/health.svg)

```
[![Health](https://phpackages.com/badges/bbcarchdev-liblod/health.svg)](https://phpackages.com/packages/bbcarchdev-liblod)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.5k](/packages/aws-aws-sdk-php)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

346132.9M112](/packages/google-cloud-core)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k40](/packages/civicrm-civicrm-core)[oat-sa/tao-core

TAO core extension

66143.7k119](/packages/oat-sa-tao-core)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[spatie/crawler

Crawl all internal links found on a website

2.8k18.5M62](/packages/spatie-crawler)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
