summaryrefslogtreecommitdiffstats
path: root/inc/util.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2015-01-20 18:07:24 +0100
committerSimon Rettberg2015-01-20 18:07:24 +0100
commit1ff2bc4f3c694b7c76df8e57056c51ca39a23a34 (patch)
tree0eb19164af66b3d4e8bf639a710f323b631d23ee /inc/util.inc.php
parentRework config module class structure. Still some TODOs though.... (diff)
downloadslx-admin-1ff2bc4f3c694b7c76df8e57056c51ca39a23a34.tar.gz
slx-admin-1ff2bc4f3c694b7c76df8e57056c51ca39a23a34.tar.xz
slx-admin-1ff2bc4f3c694b7c76df8e57056c51ca39a23a34.zip
config module structure completed. Many other fixes. Hidden pw field support.
Diffstat (limited to 'inc/util.inc.php')
-rw-r--r--inc/util.inc.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php
index cce46536..9d0eced9 100644
--- a/inc/util.inc.php
+++ b/inc/util.inc.php
@@ -216,4 +216,21 @@ SADFACE;
return true;
}
+ /**
+ * Check whether $arrax contains all keys given in $keyList
+ * @param array $array An array
+ * @param array $keyList A list of strings which must all be valid keys in $array
+ * @return boolean
+ */
+ public static function hasAllKeys($array, $keyList)
+ {
+ if (!is_array($array))
+ return false;
+ foreach ($keyList as $key) {
+ if (!isset($array[$key]))
+ return false;
+ }
+ return true;
+ }
+
}