bkuhl/bible-csb
Composer 安装命令:
composer require bkuhl/bible-csb
包简介
A PHP library for interacting with the Christian Standard Bible (CSB). Users must obtain permission for CSB text usage from Holman Bible Publishers.
README 文档
README
A PHP library for working with the Christian Standard Bible (CSB) translation. This library provides a clean, object-oriented interface for accessing Bible text, chapters, and verses.
Licensing
This PHP library enables interaction with the Christian Standard Bible (CSB) text.
Important
The CSB text is copyrighted by Holman Bible Publishers. Users must obtain permission from Holman Bible Publishers for any CSB text used with this library. See csbible.com for permission details.
Installation
composer require bkuhl/bible-csb
Usage
Creating a Book
The library provides a BookFactory to create book instances:
use BKuhl\BibleCSB\BookFactory; $bookFactory = new BookFactory(); $genesis = $bookFactory->make(BookEnum::GENESIS); $oldTestamentBooks = $bookFactory->makeByTestament(Testament::OLD); $newTestamentBooks = $bookFactory->makeByTestament(Testament::NEW); $allBooks = $bookFactory->makeAll();
Working with Books
Each book provides basic information and access to its chapters:
$name = $genesis->name(); // Returns "Genesis" $position = $genesis->position(); // Returns 1 $abbreviation = $genesis->abbreviation(); // Returns "Gen" $testament = $genesis->testament(); // Returns Testament::OLD $chapterCount = $genesis->chapterCount(); // Returns 50 $chapters = $genesis->chapters(); // Returns array of Chapter objects $chapter1 = $genesis->chapter(1); // Returns Chapter object for Genesis 1
Working with Chapters
Chapters provide access to verses and chapter information:
$number = $chapter1->number(); // Returns 1 $book = $chapter1->book(); // Returns the Book object $verseCount = $chapter1->verseCount(); // Returns number of verses in chapter $verses = $chapter1->verses(); // Returns array of Verse objects $verse = $chapter1->verse(1); // Returns Verse object for verse 1 $hasVerse = $chapter1->hasVerse(1); // Returns true if verse exists
Working with Verses
Verses provide access to the text and verse information:
$text = $verse1->text(); // Returns the verse text $number = $verse1->number(); // Returns 1 $chapter = $verse1->chapter(); // Returns the Chapter object
Example: Reading Genesis 1:1
use BKuhl\BibleCSB\BookFactory; use BKuhl\BibleCSB\BookEnum; $bookFactory = new BookFactory(); $genesis = $bookFactory->make(BookEnum::GENESIS); $chapter1 = $genesis->chapter(1); $verse1 = $chapter1->verse(1); echo $verse1->text(); // Outputs: "In the beginning God created the heavens and the earth."
Example: Reading an Entire Chapter
use BKuhl\BibleCSB\BookFactory; use BKuhl\BibleCSB\BookEnum; $bookFactory = new BookFactory(); $genesis = $bookFactory->make(BookEnum::GENESIS); $chapter1 = $genesis->chapter(1); foreach ($chapter1->verses() as $verse) { echo "Verse {$verse->number()}: {$verse->text()}\n"; }
Example: Finding a Verse by Number Across All Chapters
use BKuhl\BibleCSB\BookFactory; use BKuhl\BibleCSB\BookEnum; $bookFactory = new BookFactory(); $genesis = $bookFactory->make(BookEnum::GENESIS); $verseText = $genesis->verse(1); // Returns the text of verse 1 from any chapter
bkuhl/bible-csb 适用场景与选型建议
bkuhl/bible-csb 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 904 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 05 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bkuhl/bible-csb 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bkuhl/bible-csb 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 904
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 34
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-24