benjamindoe/bible-gateway

非官方的圣经之门PHP API

0.0.1 2018-01-16 16:38 UTC

This package is auto-updated.

Last update: 2024-09-07 04:00:04 UTC


README

非官方的圣经之门PHP API

安装

通过composer

composer require benjamindoe/bible-gateway

仅使用类文件

src/BibleGateway.class.php复制到您的项目中并包含它。

示例用法

$bible = new BibleGateway('NIV') // Version optional. Default is ESV

$bible->reference = 'John 3:16' // Starts the search

echo $bible->text // Echos the verse text

上面的代码将输出

<p>
  <span id="en-NIV-26137" class="text John-3-16">
    <sup class="versenum">16&nbsp;</sup>For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
  </span>
</p>

API使用与圣经之门网站相同的类

<span class="chapternum"></span> // Chapter number
<sup class="versenum"></sup> // Verse number
<span class="woj"></span> // Word of Jesus, can be used for red text