nfreear / http-file-dispatcher
A simple library to serve static image files & documents over HTTP/S via PHP. | © Nick Freear (IET-OU).
1.2.2
2021-07-07 11:28 UTC
Requires
- php: >=7.2
- psr/log: ^1.0
Requires (Dev)
Suggests
- phpmd/phpmd: ^2.4
- phpunit/phpunit: ~4.0
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-11 08:46:21 UTC
README
http-file-dispatcher
A simple library to serve static image files & documents over HTTP/S via PHP.
composer require nfreear/http-file-dispatcher
Example
An OctoberCMS frontend plugin:
use Nfreear\HttpFileDispatcher\FileDispatcher; class Plugin extends PluginBase { // ... public function boot() { // ... App::before(function () { FileDispatcher::debug(__METHOD__); $dispatcher = new FileDispatcher(); $dispatcher->setUriRequestPrefix('/file?f='); $dispatcher->setFilePath(__DIR__ . '/../../../themes/applaud/content/static-pages/files/'); $dispatcher->run(); }); // ... } // ... }
License
- License:
MIT - Original Gist.