public static function has(array $array, $keyPath)
    {
        self::checkKeyPathIsValidAndNonEmpty($keyPath);
        $keys = self::explodeKeys(strval($keyPath));

        while ($keys !== array()) {
            $key = array_shift($keys);

            if (!array_key_exists($key, $array)) {
                return false;
            }
            $array = $array[$key];
            if (!is_array($array)) {
                break;
            }
        }

        return $keys === array();
    }