<?php
/**
 * Middleware Interface (Base Abstraction)
 *
 * @package Licenzo\Framework\Http\Middleware
 */

namespace Licenzo\Framework\Http\Middleware;

use Licenzo\Framework\Http\Request;
use Licenzo\Framework\Http\Response;
use Closure;

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

/**
 * Base interface for HTTP middleware
 *
 * This interface provides the foundation for middleware implementation.
 * Middleware that need termination support should also implement TerminableMiddleware.
 */
interface MiddlewareInterface
{
    /**
     * Handle an incoming request
     *
     * @param Request $request
     * @param Closure $next
     * @return mixed
     */
    public function handle(Request $request, Closure $next);
}
