hampus / stack-static-file
A PHP port of Rack::Static.
0.1.0
2014-03-17 20:28 UTC
Requires
- php: >=5.3.0
- hampus/stack-file: ~0.1
- symfony/http-foundation: ~2.4
- symfony/http-kernel: ~2.4
Requires (Dev)
- phpunit/phpunit: ~4.0.6
- stack/callable-http-kernel: 1.0.*@dev
This package is auto-updated.
Last update: 2025-03-12 21:54:23 UTC
README
This is a PHP port of the Rack::Static middleware.
The middleware intercepts requests for static files (javascript files, images, stylesheets, etc) based on the url prefixes or route mappings passed in the options.
Usage
Wrap your HttpKernelInterface app in an instance of Hampus\Stack\StaticFile
or add it to your middleware stack.
With stack/builder:
<?php $options = []; $app = (new Stack\Builder) ->push('Hampus\Stack\StaticFile', $options) ->resolve($app);
Without the builder:
$app = new Hampus\Stack\StaticFile($app, $options);