mini\Static\StaticFiles class

Documentation

Static File Serving Middleware

Serves static files from _static/ directories using PathRegistry. Files in _static/path/to/file.js are accessible at /path/to/file.js.

Resolution order:

  1. Application: _static/ (or MINI_STATIC_ROOT)
  2. Framework: vendor/fubber/mini/_static/

If file not found in static registry, passes request to next handler (router).

Inheritance

Implements: Psr\Http\Server\MiddlewareInterface

Properties (1)

private array $mimeTypes

Methods (5)

Documentation missing

Process request - serve static file or pass to next handler

Find static asset in PathRegistry

Get MIME type for file

Serve static file with proper headers

Source

src/Static/StaticFiles.php:25-142