diff options
author | Simon Rettberg | 2022-09-12 09:58:19 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-09-12 09:58:19 +0200 |
commit | caa63fb08ec97f660487286ec878d991a475dd90 (patch) | |
tree | a8ac11246e5a471aba7307c1fc4a395ea162a1d8 /inc | |
parent | [eventlog] Add nic speed and duplex to filtering options (diff) | |
download | slx-admin-caa63fb08ec97f660487286ec878d991a475dd90.tar.gz slx-admin-caa63fb08ec97f660487286ec878d991a475dd90.tar.xz slx-admin-caa63fb08ec97f660487286ec878d991a475dd90.zip |
[eventlog] Add machine data to collected notification samples
Diffstat (limited to 'inc')
-rw-r--r-- | inc/arrayutil.inc.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/inc/arrayutil.inc.php b/inc/arrayutil.inc.php index d82cdbeb..9d2dcfae 100644 --- a/inc/arrayutil.inc.php +++ b/inc/arrayutil.inc.php @@ -66,4 +66,17 @@ class ArrayUtil return true; } + /** + * Check if all elements in given array are primitive types, + * i.e. not object, array or resource. + */ + public static function isOnlyPrimitiveTypes(array $array): bool + { + foreach ($array as $item) { + if (is_array($item) || is_object($item) || is_resource($item)) + return false; + } + return true; + } + }
\ No newline at end of file |