PHPackages                             acdh-oeaw/arche-lib-schema - 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. [API Development](/categories/api)
4. /
5. acdh-oeaw/arche-lib-schema

ActiveLibrary[API Development](/categories/api)

acdh-oeaw/arche-lib-schema
==========================

An API providing commonly used views on the ARCHE ontology

7.1.2(1y ago)06.6k↑133.3%4MITPHPPHP ^8.1CI passing

Since Mar 16Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/acdh-oeaw/arche-lib-schema)[ Packagist](https://packagist.org/packages/acdh-oeaw/arche-lib-schema)[ Docs](https://github.com/acdh-oeaw/arche-lib-schema)[ RSS](/packages/acdh-oeaw-arche-lib-schema/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (37)Used By (4)

arche-lib-schema
================

[](#arche-lib-schema)

[![Latest Stable Version](https://camo.githubusercontent.com/ed5cbcb62e5af6054aad21551ca941a9171d1e36c4b80b52b59a029675da0a58/68747470733a2f2f706f7365722e707567782e6f72672f616364682d6f6561772f61726368652d6c69622d736368656d612f762f737461626c65)](https://packagist.org/packages/acdh-oeaw/arche-lib-schema)[![Build status](https://github.com/acdh-oeaw/arche-lib-schema/workflows/phpunit/badge.svg?branch=master)](https://github.com/acdh-oeaw/arche-lib-schema/workflows/phpunit/badge.svg?branch=master)[![Coverage Status](https://camo.githubusercontent.com/7bcb69beda6a742c5ef2dcbaa3ea416d81fdb082217c642c312a2b5e7f884df1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616364682d6f6561772f61726368652d6c69622d736368656d612f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/acdh-oeaw/arche-lib-schema?branch=master)[![License](https://camo.githubusercontent.com/6f890b9a5c8152b69ce528ec25fa2e0d6779012577e876ccf86b8361ce6aaa2c/68747470733a2f2f706f7365722e707567782e6f72672f616364682d6f6561772f61726368652d6c69622d736368656d612f6c6963656e7365)](https://packagist.org/packages/acdh-oeaw/arche-lib-schema)

An API for the ACDH ontology stored in an ARCHE repository.

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

[](#installation)

`composer require acdh-oeaw/arche-lib-schema`

API Documentation
-----------------

[](#api-documentation)

Usage
-----

[](#usage)

```
// if we can set up a direct database connection - this will provide faster
// initialization and vocabulary value checks
$conn = new PDO('pgsql: repo db connection details');
$cfg = (object) [
    'ontologyNamespace' => 'https://vocabs.acdh.oeaw.ac.at/schema#',
    'parent'            => 'https://vocabs.acdh.oeaw.ac.at/schema#isPartOf',
    'label'             => 'https://vocabs.acdh.oeaw.ac.at/schema#hasTitle',
];
$ontology = \acdhOeaw\arche\lib\schema\Ontology::factoryDb($conn, $cfg);
// or just from the ARCHE API URL - slower but always works
$ontology = \acdhOeaw\arche\lib\schema\Ontology::factoryRest('https://arche.acdh.oeaw.ac.at/api');

$class = $ontology->getClass('https://vocabs.acdh.oeaw.ac.at/schema#Person');
print_r($class);

$property = $ontology->getProperty('https://vocabs.acdh.oeaw.ac.at/schema#RepoObject', 'https://vocabs.acdh.oeaw.ac.at/schema#hasContact');
print_r($property);

$property = $ontology->getProperty(null, 'https://vocabs.acdh.oeaw.ac.at/schema#hasContact');
print_r($property);

// controlled vocabulary on a property
$property = $ontology->getProperty(null, 'https://vocabs.acdh.oeaw.ac.at/schema#hasLicense');
echo $property->checkVocabularyValue('cc-by-4-0', \acdhOeaw\arche\lib\schema\Ontology::VOCABSVALUE_ALL); // doesn't fetch  all vocabulary values
print_r($property->getVocabularyValue('https://vocabs.acdh.oeaw.ac.at/archelicenses/cc-by-4-0')); // doesn't fetch  all vocabulary values
print_r($property->vocabularyValues); // fetches all values
echo $property->vocabularyValues['https://vocabs.acdh.oeaw.ac.at/archelicenses/cc-by-4-0']->getLabel('de'); // fetches all values first if they aren't loaded yet

// store cache in ontology.cache and refresh it every 600s
$ontology = new \acdhOeaw\arche\lib\schema\Ontology::factoryDb($conn, $cfg, 'ontology.cache', 600);
$ontology = new \acdhOeaw\arche\lib\schema\Ontology::factoryRest('https://arche.acdh.oeaw.ac.at', 'ontology.cache', 600);
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance58

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity77

Established project with proven stability

 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 ~47 days

Total

36

Last Release

586d ago

Major Versions

4.0.6 → 5.0.02021-05-13

5.0.3 → 6.0.02021-07-14

6.2.0 → 7.0.0-RC12023-09-27

6.2.1 → 7.1.02024-03-18

v6.x-dev → 7.1.12024-09-26

PHP version history (4 changes)1.0.0PHP &gt;= 7.1

4.0.4PHP &gt;= 7.3

6.0.3PHP &gt;= 8

7.1.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1f662e3acb95efd9208cdcd2c97437db366044aea705985251760efcbd23070?d=identicon)[zozlak](/maintainers/zozlak)

---

Top Contributors

[![zozlak](https://avatars.githubusercontent.com/u/6503177?v=4)](https://github.com/zozlak "zozlak (111 commits)")

---

Tags

arche

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/acdh-oeaw-arche-lib-schema/health.svg)

```
[![Health](https://phpackages.com/badges/acdh-oeaw-arche-lib-schema/health.svg)](https://phpackages.com/packages/acdh-oeaw-arche-lib-schema)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)

PHPackages © 2026

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