Download the PHP package rootxs/sudobible without Composer

On this page you can find all versions of the php package rootxs/sudobible. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sudobible

SudoBible

Open source Bible API.

Installation & Setup

Instantiate SudoBible with your database credentials, and optional translation preference (default translation is the World English Bible, a modern, public-domain, English translation):

Call the following method once when first setting up, then delete this code once your tables have been created:

Leaving this code in your application won't break anything. It will just cause your application to make several superfluous database queries each time it runs. Therefore, it is recommended to run this once and then remove it from your code.

Alternatively, you can manually run the queries found in the queries directory. Find the sub-directory for your database type (e.g., mysql) and first run the create scripts, in order. Then run the insert scripts.

Basic usage

Get a single verse:

Get an entire chapter:

Get a passage (supply beginning & end verses):

Get one or more verses based on a topic:

The SudoBiblePassage Object

verse(), chapter(), and ref() each return a SudoBiblePassage object which contains the requested passage and provides utilities for manipulating it.

Printing the passage

The SudoBiblePassage object employs the __toString() magic method, allowing you to simply echo or print the object.

Output:

For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life. (John 3:16)

Styling the passage

The SudoBiblePassage object provides a few methods for styling the string output.

Output:

16 For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life. 17 For God didn't send his Son into the world to judge the world, but that the world should be saved through him. (John 3:16-17)

All of the styling methods accept a boolean parameter, so you can switch the styling off if it was previously turned on:

The boolean flag defaults to true, so if you just want to turn the feature "on," no parameter is necessary.

Navigating the passage

The SudoBiblePassage object also provides a mechanism for proceding beyond the chosen passage:

Deleting or refreshing the database

To delete the sudo_bible_* tables, run this once in your PHP code:

Or, you can manually run the scripts found in queries/{DB_TYPE}/drop.

To refresh the tables (after an update to the SudoBible repo, for example), you can run this in your PHP:

This simply combines uninstall() with install(). You may also manually run the query scripts in drop, create, and insert, in that order.


All versions of sudobible with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rootxs/sudobible contains the following files

Loading the files please wait ....