/** * Create an array of values to use in place of variables in template strings * * @param BfoxRef $ref * @return array */ private static function template_vars(BfoxRef $ref) { $book_name = ''; $ch1 = $vs1 = 0; if ($ref->is_valid()) { $bcvs = BfoxRef::get_bcvs($ref->get_seqs()); $books = array_keys($bcvs); $book_name = BibleMeta::get_book_name($books[0]); $cvs = array_shift($bcvs); $cv = array_shift($cvs); list($ch1, $vs1) = $cv->start; } return array('%ref%' => urlencode($ref->get_string()), '%book%' => urlencode($book_name), '%chapter%' => $ch1, '%verse%' => $vs1); }
/** * Subtract bible references * * @param BfoxRef $ref */ public function sub_ref(BfoxRef $ref) { return $this->sub_seqs($ref->get_seqs()); }