Ejemplo n.º 1
0
<?php

$qb = new QuickBibleCli();
$qb->getLastOptions();
$qb->parseCli();
if ($qb->getQuery() == "") {
    $qb->simpleParseCli();
}
$qb->putOptions();
try {
    $qb->validateBible();
} catch (Exception $e) {
    echo $e->getMessage();
    exit;
}
$qb->determinePath();
class QuickBibleCli
{
    protected $base_dir;
    protected $bible;
    protected $options = array('q' => '');
    protected $bible_path = '';
    protected $cfg_file = '';
    public function getQuery()
    {
        if (!isset($this->options['q'])) {
            $this->options['q'] = '';
        }
        return $this->options['q'];
    }
    public function __construct()