-
Notifications
You must be signed in to change notification settings - Fork 1
ScripturNum ScripturNum
James K. edited this page Sep 5, 2023
·
4 revisions
- Class name: ScripturNum
- Namespace: \ScripturNum
protected mixed int
- Visibility: protected
protected mixed book
- Visibility: protected
protected mixed startCh
- Visibility: protected
protected mixed startV
- Visibility: protected
protected mixed endCh
- Visibility: protected
protected mixed endV
- Visibility: protected
protected mixed stringSettings = ['abbrev' => ['space' => '', 'cvsep' => '.', 'range' => '-', 'names' => 1, 'plurl' => false], 'long' => ['space' => ' ', 'cvsep' => ':', 'range' => '-', 'names' => 0, 'plurl' => true]]
- Visibility: protected
mixed ScripturNum\ScripturNum::__construct(int|string intOrString)
ScripturNum constructor.
- Visibility: public
- intOrString int|string - ScripturNum int or a human-readable string.
- mixed
mixed ScripturNum\ScripturNum::setStringSettings(mixed key, array settings)
- Visibility: public
- This method is static.
- key mixed* settings array
- mixed
int ScripturNum\ScripturNum::getInt()
Get the ScripturNum integer.
- Visibility: public
- int -
mixed ScripturNum\ScripturNum::__toString()
- Visibility: public
- mixed
string ScripturNum\ScripturNum::getAbbrev()
Get a human-readable abbreviation for the passage. By default, these are meant for usage in short links.
- Visibility: public
- string - An abbreviation
string ScripturNum\ScripturNum::getLongString()
Get a human-readable name of the passage. By default, these are meant for humans to read.
- Visibility: public
- string - The name of the passage, as one might pronounce it.
string ScripturNum\ScripturNum::getStringWithSettings(string settingKey)
Returns a human-readable string with the settings defined in a given setting set.
- Visibility: public
- settingKey string - The setting set to use. Default options are 'abbrev' and 'long'
- string - The human-intelligible string.
mixed ScripturNum\ScripturNum::isWholeChapters()
- Visibility: public
- mixed
mixed ScripturNum\ScripturNum::isWholeBook()
- Visibility: public
- mixed
mixed ScripturNum\ScripturNum::bookHasSingleChapter()
- Visibility: public
- mixed
mixed ScripturNum\ScripturNum::_bookName2bookNum(mixed bookName)
- Visibility: protected
- This method is static.
- bookName mixed
- mixed
mixed ScripturNum\ScripturNum::newFromParsed(mixed bookStr, mixed startCh, mixed startV, mixed endCh, mixed endV)
- Visibility: public
- This method is static.
- bookStr mixed* startCh mixed* startV mixed* endCh mixed* endV mixed
- mixed
\ScripturNum\ScripturNum ScripturNum\ScripturNum::newFromInts(int book, int startCh, int startV, int|null endCh, int|null endV)
- Visibility: public
- This method is static.
- book int - The book of the Bible the range is within. 1-rel.
- startCh int - The chapter of the start of the range. 1-rel.
- startV int - The verse of the start of the range. 1-rel. Defaults to 1.
- endCh int|null - The end chapter of the range. If null or not provided, assumed to be the same as the start chapter.
- endV int|null - The end verse of the range. If null or not provided, assumed to be the end of the chapter.
- \ScripturNum\ScripturNum - The ScripturNum object that represents this range of scripture.
int ScripturNum\ScripturNum::string2int(string string)
- Visibility: public
- This method is static.
- string string - A human-readable scripture reference that should be converted to an int.
- int - The int.
mixed ScripturNum\ScripturNum::_refNums2int(mixed book, mixed startCh, mixed startV, mixed endCh, mixed endV)
- Visibility: protected
- This method is static.
- book mixed* startCh mixed* startV mixed* endCh mixed* endV mixed
- mixed
mixed ScripturNum\ScripturNum::_refNumString2refNums(string string, chapterStart, verseStart, chapterEnd, verseEnd)
This function reads through a ref string one character at a time to parse it into a known reference.
- Visibility: protected
- This method is static.
- string string - The string to parse.
- chapterStart mixed* verseStart mixed* chapterEnd mixed* verseEnd mixed
- mixed
mixed ScripturNum\ScripturNum::_int2refNums(int int, int book, int chapterStart, int verseStart, int chapterEnd, int verseEnd)
Converts a ScripturNum int into reference numbers.
- Visibility: protected
- This method is static.
- int int - The ScripturNum integer
- book int - The book number
- chapterStart int - The first Chapter
- verseStart int - The first Verse
- chapterEnd int - The last Chapter
- verseEnd int - The last Verse
- mixed
mixed ScripturNum\ScripturNum::int2concats(int int, string|int concatStart, string|int concatEnd)
Convert a ScrupturNum int into a concatenated number. (Concatenated numbers are often used for text libraries.)
- Visibility: public
- This method is static.
- int int - The int representing the full passage
- concatStart string|int - The concatenated "number" possibly larger than an int representing the start of the passage.
- concatEnd string|int - The concatenated "number" possibly larger than an int representing the end of the passage.
- mixed
mixed ScripturNum\ScripturNum::_bkIndex2singleRef(int book, int index, int chapter, int verse)
Parse a book index number into a chapter and verse.
- Visibility: protected
- This method is static.
- book int - Book number
- index int - Verse Index Number
- chapter int - Chapter
- verse int - Verse
- mixed
- ScripturNum