status flag
This commit is contained in:
@@ -368,6 +368,17 @@ class Helper {
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function setBit($val,$index,$bit_on){
|
||||
$flag = +$val;
|
||||
if ( $bit_on ){
|
||||
$flag |= 1 << $index;
|
||||
}else{
|
||||
$flag &= ~ (1 << $index);
|
||||
}
|
||||
return $flag;
|
||||
}
|
||||
|
||||
|
||||
public static function generateRandomString($length = 6,$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWX' ) {
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
|
||||
Reference in New Issue
Block a user