From: Matthias Schmidt Date: Thu, 4 Aug 2011 16:18:26 +0000 (+0200) Subject: Reinserted ArrayUtil::intersectKeys() X-Git-Tag: 2.0.0_Beta_1~1916^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f7937a7d0bdad3ad69fc7f5d04bbac4bf8ccb36;p=GitHub%2FWoltLab%2FWCF.git Reinserted ArrayUtil::intersectKeys() --- diff --git a/wcfsetup/install/files/lib/util/ArrayUtil.class.php b/wcfsetup/install/files/lib/util/ArrayUtil.class.php index c99256734c..787656e760 100644 --- a/wcfsetup/install/files/lib/util/ArrayUtil.class.php +++ b/wcfsetup/install/files/lib/util/ArrayUtil.class.php @@ -102,6 +102,19 @@ class ArrayUtil { return $array; } + /** + * Alias to php array_intersect_key() function. + * + * @param array $array1 The array with master keys to check. + * @param array $array2 An array to compare keys against. + * @return Returns an associative array containing all the values of array1 which have matching keys that are present in all arguments. + * @deprecated + */ + public static function intersectKeys($array1, $array2) { + $parameters = func_get_args(); + return call_user_func_array('array_intersect_key', $parameters); + } + /** * Converts dos to unix newlines. *