예제 #1
0
파일: Users.php 프로젝트: skullab/area51
 public static function getProgressiveCode($maxLength = 7, $substitute = 0)
 {
     $max = Users::maximum(array('column' => 'id'));
     $code = str_pad((int) substr($max, -4) + 1, $maxLength, $substitute, STR_PAD_LEFT);
     return $code;
 }