Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class SerialNumberGenerator extends ConfigInit |
||
10 | { |
||
11 | private $sn; |
||
12 | |||
13 | function __construct($config_array=null) |
||
14 | { |
||
15 | $this->runConfig($config_array); |
||
16 | } |
||
17 | |||
18 | protected function generatingSN() |
||
19 | { |
||
20 | for($i=1;$i<=intval($this->segment);$i++) |
||
21 | { |
||
22 | $this->sn .= $this->sn()->formattedId($this->charset,intval($this->length)).$this->seperator; |
||
23 | } |
||
24 | |||
25 | $sn = $this->sn; |
||
26 | return rtrim($sn, $this->seperator); |
||
27 | } |
||
28 | |||
29 | private function sn() |
||
34 | } |
||
35 | } |
||
36 |