Download the PHP package devdot/bible-text-provider without Composer
On this page you can find all versions of the php package devdot/bible-text-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devdot/bible-text-provider
More information about devdot/bible-text-provider
Files in devdot/bible-text-provider
Package bible-text-provider
Short Description Provide texts from the bible by reference, loaded from local files.
License MIT
Informations about the package bible-text-provider
Bible Data Provider
Provide texts from the bible by reference, loaded from local files.
This library works well to provide the text for verse references that were found using stevenbuehner/bible-verse-bundle.
Installation
Install the library with composer:
Then provide your own data files. Because of copyrights, this package does not deliver actual bible texts. See further at Building your own data. If you need a hint on how to generate your own bible texts, you may contact me.
Basic Usage
You may quickly load the verses for a reference (as provided by stevenbuehner/bible-verse-bundle):
Building your own data
As stated above, I cannot provide actual bible texts in this package for legal reasons. You may build your own bible data from public sources and then provide it to your PHP application using this package.
An example of the data format can be seen in tests/data.
Root file (bibles.php)
This file is supplied to BiblesLoader
. It is only loaded when any bible is accessed.
See tests/data/test-bibles.php for a working example.
Books list (books.php)
This file is only loaded when a book of a given bible is accessed. Its relative location must be defined in bibles.php
.
See tests/data/tes/books.php for a working example.
To find out about book IDs you may look at the BookIdResolver Helper. You may also introduce your own book ID system.
Book file
These files are only loaded when the corresponding book of a given bible is accessed. Its relative location must be defined in books.php
.
Your bible texts may have multiple segments. In that case, the verse-text is not a string
but an array of strings (array<string>
):
By default, the segments are merged into a single verse string. You may access these segments individually through the arguments of Verse->getText()
.
See tests/data/tes/0-gen.php for a working example.
License
Bible Text Provider is licensed under the MIT License. See the LICENSE file for details.