snap/bible-books

一个简单的PHP类,用于获取圣经各卷的章节和经文数据。

0.1.1.x-dev 2015-06-20 23:49 UTC

This package is not auto-updated.

Last update: 2024-09-24 07:57:43 UTC


README

2015年6月20日 - 版本 0.1.1

这是一个包含圣经各卷章节和经文数量的数组以及一些有用方法的类。

安装

只需将 "snap/bible-books": "0.1.*" 添加到您的 composer.json 文件中,或者下载并手动引入文件。注意:您还需要将 "minimum-stability": "dev" 添加到您的 composer.json 文件中。

简单用法

// require the class file if you aren't using an autoloader
require_once('path/to/BibleBooks.php');
// create the object
$BibleBooks = new \Snap\BibleBooks\BibleBooks();
// get an array of the books
$books = $BibleBooks->getArrayOfBooks(); // a big array
// get the number of chapters in a book
$number_of_chapters = $BibleBooks->getNumberOfChapters('John'); // 21
// get an array of the chapters for a book
$chapters = $BibleBooks->getArrayOfChapters('John'); // a small array
// get the number of verses in a book's chapter
$number_of_verses = $BibleBooks->getNumberOfVerses('John', 3); // 36

希望这个类对您有所帮助。如果是的话,请通过以下方式表达您的感谢:

  1. 通过拉取请求让我知道您可能发现的任何错误
  2. 给我发一封友好的邮件告诉我它如何帮助了您
  3. 雇佣我为您的下一个PHP项目工作

谢谢,祝您快乐,祝您PHP编程愉快,上帝保佑,

Alex Fraundorf

AlexFraundorf.com