PHPackages                             moehrenzahn/scripturekit - 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. moehrenzahn/scripturekit

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

moehrenzahn/scripturekit
========================

ScriptureKit PHP

1.1(6y ago)13141PHPPHP ^7.2CI failing

Since Mar 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/moehrenzahn/scripturekit-php)[ Packagist](https://packagist.org/packages/moehrenzahn/scripturekit)[ RSS](/packages/moehrenzahn-scripturekit/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

ScriptureKit PHP
================

[](#scripturekit-php)

A PHP framework for working with scripture XML files from the [Zefania Project](https://zefania-sharp.sourceforge.io/)and [qurandatabase.org](http://qurandatabase.org).

Requirements
------------

[](#requirements)

- PHP 7.2 or newer with SimpleXML and mbstring extensions
- Composer package manager

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

[](#installation)

ScriptureKit can only be installed via the package manager [Composer](https://getcomposer.org):

`composer require moehrenzahn/scripturekit`

For more information about how to use Composer in your Project, see [the Composer documentation](https://getcomposer.org/doc/00-intro.md).

Features
--------

[](#features)

You can use ScriptureKit to:

- load the text of a chapter
- load the text of a verse
- load the text of a set of verses
- render a formatted reference string for a chapter, verse set, or verse
- load version details for a scripture file.

When loading verse text, there are the following options available:

- render as `HTML` or plain text
- highlight individual verses
- automatically add paragraph-breaks at the end of sentences
- include annotations (ZefaniaXML only)

ScriptureKit is compatible with the following scripture files:

- [ZefaniaXML](https://zefania-sharp.sourceforge.io/) files (.xml)
- `XML Format (One File-Whole Quran)` exported from [qurandatabase.org](http://qurandatabase.org). (.xml)
- [Sefaria](https://www.sefaria.org) JSON format concatenated via [Sefaria Merger](https://github.com/moehrenzahn/sefaria-merger)

Usage
-----

[](#usage)

### Instantiation

[](#instantiation)

```
$availableCollections = [
    Moehrenzahn\ScriptureKit\Data\VerseRequest::COLLECTION_NT,
    Moehrenzahn\ScriptureKit\Data\VerseRequest::COLLECTION_OT
];

$version = new \Moehrenzahn\ScriptureKit\Data\Version(
    'International Standard Version',     // Title of the version
    'xml/bibles/isv.xml', // Filesystem path to the xml file you want to load
    \Moehrenzahn\ScriptureKit\Data\Version::TYPE_BIBLE, // The type of version (Zefania XML Tanakh, Zefania XML Bible, or Qurandatabase Quran)
    $availableCollections // List of Collections available in the version, see Moehrenzahn\ScriptureKit\Data\VerseRequest::COLLECTION_*
);
// Instantiate the ScriptureKit service
$service = new \Moehrenzahn\ScriptureKit\Service($version);
```

Loading the text of a Verse
---------------------------

[](#loading-the-text-of-a-verse)

```
$version = new \Moehrenzahn\ScriptureKit\Data\Version($filePath, $type, $availableCollections);
$service = new \Moehrenzahn\ScriptureKit\Service($version);

$verseRequestBuilder = new \Moehrenzahn\ScriptureKit\VerseRequestBuilder(
    3, // Number of the start chapter to load,
    Moehrenzahn\ScriptureKit\Data\VerseRequest::COLLECTION_NT, // Collection from which to load the verse (Tanakh, OT, NT, or Quran)
    16 // Start verse to load
);
// Number of the Book to load (if collection is not Quran). First book starts at 1 (Matthew)
$verseRequestBuilder->setBookNumber(4);
// List of verses to render with highlight
$verseRequestBuilder->setHighlightedVerses([]);
// Render as HTML instead of plain text
$verseRequestBuilder->setReturnHtml(true);
// See \Moehrenzahn\ScriptureKit\VerseRequestBuilder for more options
$verseRequestBuilder->set...();

$verse = $service->createVerse($verseRequestBuilder->build());

// Print verse text (as HTML)
echo $verse->getText();

// Print verse reference string ("New Testament, John 3:16")
echo $verse->getFullReference();
// Print a compact reference (John 3:16)
echo $verse->getCompactReference();
// See \Moehrenzahn\ScriptureKit\Data\RenderedVerse for more options
echo $verse->get...();
```

### Loading Version details

[](#loading-version-details)

```
$version = new \Moehrenzahn\ScriptureKit\Data\Version($filePath, $type, $availableCollections);
$service = new \Moehrenzahn\ScriptureKit\Service($version);

$detailedVersion = $service->createDetailedVersion();

echo $detailedVersion->getTitle();
echo $detailedVersion->getDetails()['language'];
```

Internationalisation
--------------------

[](#internationalisation)

You can internationalise the names for books and chapters, as well as the verse separator (default `:`).

Your configured strings will be used when generating verse references.

```
$version = new \Moehrenzahn\ScriptureKit\Data\Version($filePath, $type, $availableCollections);
$service = new \Moehrenzahn\ScriptureKit\Service($version);
$requestBuilder = new \Moehrenzahn\ScriptureKit\VerseRequestBuilder($chapterNumber, $collection, $startVerse, $endVerse, $endChapter);

$requestBuilder->setChapterVerseSeparator(',');
$requestBuilder->setTanakhBookNames(\Moehrenzahn\ScriptureKit\Util\TanakhBookNames::BOOK_NAMES);
$requestBuilder->setBibleBookNames(\Moehrenzahn\ScriptureKit\Util\BibleBookNames::BOOK_NAMES);
$requestBuilder->setQuranChapterNames(\Moehrenzahn\ScriptureKit\Util\QuranChapterNames::CHAPTER_NAMES);
```

Testing
-------

[](#testing)

ScriptureKit contains a non-exhaustive suite of PHPUnit tests. You can execute the tests via the projects makefile:

`make phpunit`

Author
------

[](#author)

Max Melzer
moehrenzahn.de

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

2226d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/695e3bfd8205ec067be29cbcf46630d7fc6586d050acbe630783a1d382cac71f?d=identicon)[moehrenzahn](/maintainers/moehrenzahn)

---

Top Contributors

[![moehrenzahn](https://avatars.githubusercontent.com/u/4653731?v=4)](https://github.com/moehrenzahn "moehrenzahn (20 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moehrenzahn-scripturekit/health.svg)

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

###  Alternatives

[agencetwogether/hookshelper

Simple plugin to toggle display hooks available in current page.

2312.7k](/packages/agencetwogether-hookshelper)[qbhy/hyperf-multi-env

287.4k2](/packages/qbhy-hyperf-multi-env)[speixoto/yii2-amcharts

AmCharts Widget for Yii 2

1414.2k](/packages/speixoto-yii2-amcharts)

PHPackages © 2026

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