public static function searchKey($array, $needle)
    {
        $return = false;
        if (!\is_array($array)) {
            $array = array();
        }
        $arrayKeys = array();
        foreach ($array as $k => $v) {
            if ($k == $needle) {
                $return = $v;
                break;
            }
            if (\is_array($v)) {
                // don't search deeper levels until finished with this level
                $arrayKeys[] = $k;
            }
        }
        if ($return === false) {
            foreach ($arrayKeys as $k) {
                $result = self::searchKey($array[$k], $needle);
                if ($result !== false) {
                    $return = $result;
                    break;
                }
            }
        }
        return $return;
    }