Common/Generator/DefaultNumberGenerator.php
protected function generateNumber($number)
    {
        if (!empty($this->prefix)) {
            if (0 !== strpos($number, $this->prefix)) {
                $number = 0;
            } else {
                $number = intval(substr($number, strlen($this->prefix)));
            }
        } else {
            $number = intval($number);
        }

        if ($this->debug && 999999 > $number) {
            $number = 999999;
        }

        return $this->prefix . str_pad($number + 1, $this->length - strlen($this->prefix), '0', STR_PAD_LEFT);
    }
protected function generateNumber($number)
    {
        if (!empty($this->prefix)) {
            if (0 !== strpos($number, $this->prefix)) {
                $number = 0;
            } else {
                $number = intval(substr($number, strlen($this->prefix)));
            }
        } else {
            $number = intval($number);
        }

        if ($this->debug && 999999 > $number) {
            $number = 999999;
        }

        return $this->prefix . str_pad($number + 1, $this->length - strlen($this->prefix), '0', STR_PAD_LEFT);
    }
protected function generateNumber ( $ number ) { if ( ! empty ( $ this -> prefix ) ) { if ( 0 !== strpos ( $ number , $ this -> prefix ) ) { $ number = 0 ; } else { $ number = intval ( substr ( $ number , strlen ( $ this -> prefix ) ) ) ; } } else { $ number = intval ( $ number ) ; } if ( $ this -> debug && 999999 > $ number ) { $ number = 999999 ; } return $ this -> prefix . str_pad ( $ number + 1 , $ this -> length - strlen ( $ this -> prefix ) , '0' , STR_PAD_LEFT ) ; }
Generates the number.

@param string $number

@return string
Generates the number .