public static function getArrayItemByPointSeparatedKey(array& $data, string $key)
    {
        if (strpos($key, '.') !== false) {
            preg_match('/([a-zA-Z0-9_\-]+)\.([a-zA-Z0-9_\-\.]+)/', $key, $keys);
            if (!isset($data[$keys[1]])) {
                throw new Exception('Undefined index: '.$keys[1]);
            }
            if (!is_array($data[$keys[1]])) {
                throw new Exception("The element indexed {$keys[1]} isn't an array.");
            }
            return self::getArrayItemByPointSeparatedKey(
                $data[$keys[1]],
                $keys[2]
            );
        } elseif (isset($data[$key])) {
            return $data[$key];
        } else {
            throw new Exception('Undefined index: '.$key);
        }
    }