Merge branch 'Development' into feature/radius

This commit is contained in:
Ibnu Maksum
2023-09-27 14:26:12 +07:00
33 changed files with 653 additions and 232 deletions

View File

@ -56,7 +56,11 @@ class Lang
}
public static function arrayCount($arr){
return count($arr);
if(is_array($arr)){
return count($arr);
}else{
return 0;
}
}
public static function getNotifText($key){

View File

@ -299,4 +299,23 @@ class Validator
return (bool)in_array($format, $formats);
}
public static function countRouterPlan($plans, $router){
$n = 0;
foreach ($plans as $plan){
if($plan['routers'] == $router){
$n++;
}
}
return $n;
}
public static function isRouterHasPlan($plans, $router){
foreach ($plans as $plan){
if($plan['routers'] == $router){
return true;
}
}
return false;
}
}