Skip to main content

Middleware Submodule

1. Overview (What does this do?)​

The Middleware submodule within ferrox-php-observability encapsulates the localized logic required for enterprise-grade execution of this domain boundary.

2. Philosophy (Why does it exist?)​

By isolating Middleware into its own distinct submodule, Ferrox enforces the Single Responsibility Principle and guarantees that modifying middleware logic will not inadvertently corrupt other decoupled systems.

3. API & Function Reference​

Below is the highly detailed documentation extracted and inferred directly from the codebase for every path, class, and single function within the Middleware submodule:

Path: ferrox-php-observability/src/Middleware/ObservabilityMiddleware.php​

Class / Interface: ObservabilityMiddleware​

The ObservabilityMiddleware is responsible for enterprise-grade execution of operations within ferrox-php-observability/src/Middleware/ObservabilityMiddleware.php.

  • process(Request $request, RequestHandlerInterface $handler) : Response

    • Intercepts the HTTP request within the 7-Layer Pipeline, enforcing strict security, logging, and compliance constraints before passing it to the next handler.
  • recordMetrics(Request $request, int $statusCode, float $startTime, int $startMemory) : void

    • Executes the recordMetrics domain logic securely. Enforces strict type constraints, adhering to Ferrox's Zero-Trust and memory-safe paradigms.