18 class Alphanum extends \Magento\Eav\Model\Entity\Increment\AbstractIncrement
28 return '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
39 $lastId = $this->getLastId();
41 if (strpos($lastId, $this->getPrefix()) === 0) {
42 $lastId = substr($lastId, strlen($this->getPrefix()));
50 $lchars = strlen($chars);
51 $lid = strlen($lastId) - 1;
53 for (
$i = $lid;
$i >= 0;
$i--) {
54 $p = strpos($chars, $lastId[
$i]);
56 throw new \Magento\Framework\Exception\LocalizedException(
57 __(
'Invalid character encountered in increment ID: %1', $lastId)
62 $bumpNextChar =
false;
68 $nextId = $chars[$p] . $nextId;
71 return $this->
format($nextId);