优化CURD功能
This commit is contained in:
@@ -845,8 +845,9 @@ class Helper
|
||||
return $itemJson;
|
||||
}
|
||||
|
||||
public static function formatObjectKey(string $keyName): string
|
||||
public static function formatObjectKey(string|int $keyName): string
|
||||
{
|
||||
$keyName = is_int($keyName) ? strval($keyName) : $keyName;
|
||||
if (preg_match("/^[a-zA-Z_][a-zA-Z0-9_]+$/", $keyName)) {
|
||||
return $keyName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user