perf: 完善LDAP

This commit is contained in:
kuaifan
2023-02-09 09:56:45 +08:00
parent b60b572494
commit 63bb145224
10 changed files with 416 additions and 82 deletions

View File

@@ -917,6 +917,27 @@ class Base
return array_values($array);
}
/**
* 数组拼接字符串(前后也加上)
* @param $glue
* @param $pieces
* @param $around
* @return string
*/
public static function arrayImplode($glue = "", $pieces = null, $around = true)
{
if ($pieces == null) {
$pieces = $glue;
$glue = ',';
}
$pieces = array_values(array_filter(array_unique($pieces)));
$string = implode($glue, $pieces);
if ($around && $string) {
$string = ",{$string},";
}
return $string;
}
/**
* 判断是否二维数组
* @param $array