/** * Counts the digit for the given ISBN number. Works with both * ISBN-10 and ISBN-13. * @param string $identifier ISBN which check digit needs to be calculated * @return character check digit of the given ISBN */ public function getCheckDigit($identifier) { // Include ISBN helper class require_once JPATH_ADMINISTRATOR . '/components/com_isbnregistry/helpers/publisherisbnrange.php'; // Calculate check digit - use same algorithm that's used with ISBN-13 return PublishersisbnrangeHelper::countIsbnCheckDigit($identifier); }
/** * Counts the digit for the given ISBN number. Works with both * ISBN-10 and ISBN-13. * @param string $identifier ISBN which check digit needs to be calculated * @return character check digit of the given ISBN */ public function getCheckDigit($identifier) { // Include helper class require_once JPATH_ADMINISTRATOR . '/components/com_isbnregistry/helpers/publisherisbnrange.php'; // Calculate check digit return PublishersisbnrangeHelper::countIsbnCheckDigit($identifier); }