コード例 #1
0
ファイル: test.php プロジェクト: jkrrv/ScripturNum
var_dump($s);
echo $s;
// Matthew 8-9
$n = ScripturNum::newFromInts(40, 8, null, 9);
var_dump($n);
echo $n;
// 1 Corinthians 15:50-58
$n = ScripturNum::newFromInts(46, 15, 50, null, 58);
var_dump($n);
echo $n->getAbbrev();
// Revelation.  The whole thing.
$n = ScripturNum::newFromInts(66, 1, 1, 22);
var_dump($n);
echo $n;
// Titus.  The whole thing, the easy(er) way.
$n = ScripturNum::newFromParsed('Tit');
var_dump($n);
echo $n;
// From String.
$n = ScripturNum::newFromString("1 Corinthians 13");
// 10
var_dump($n);
echo $n;
$n = ScripturNum::newFromString("1 Corinthians 1-3");
// 11
var_dump($n);
echo $n;
$n = ScripturNum::newFromString("1 Corinthians 1-2:11");
// 12
var_dump($n);
echo $n;
コード例 #2
0
 public function test_newFromParsed()
 {
     $n = ScripturNum::newFromParsed('Matthew', 8, null, 9);
     $this->assertEquals('Matthew 8-9', (string) $n);
 }