Download the PHP package adriansuter/psr7-minify-middleware without Composer
On this page you can find all versions of the php package adriansuter/psr7-minify-middleware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download adriansuter/psr7-minify-middleware
More information about adriansuter/psr7-minify-middleware
Files in adriansuter/psr7-minify-middleware
Download adriansuter/psr7-minify-middleware
More information about adriansuter/psr7-minify-middleware
Files in adriansuter/psr7-minify-middleware
Vendor adriansuter
Package psr7-minify-middleware
Short Description PSR-7 Middleware that minifies the response body (HTML Minify).
License MIT
Homepage http://github.com/adriansuter/psr7-minify-middleware
Package psr7-minify-middleware
Short Description PSR-7 Middleware that minifies the response body (HTML Minify).
License MIT
Homepage http://github.com/adriansuter/psr7-minify-middleware
Please rate this library. Is it a good library?
Informations about the package psr7-minify-middleware
PSR-7 middleware to minify the response body
Simple PSR-7 Middleware that minifies the response body. This middleware can be used to minify the html output.
By default, all textarea
and pre
sections would not be minified (ignored). This can be customized.
Installation
composer require adriansuter/psr7-minify-middleware
Usage
The constructor of this middleware has two parameters:
- A callback that returns a new object implementing the
Psr\Http\Message\StreamInterface
in order to be able to minify the content. - The html elements (tag names) that should be ignored. This parameter is
optional and defaults to the array
['textarea', 'pre']
.
In Slim 3:
In order to customize the html elements to be ignored, simply add a second parameter to the constructor:
Testing
- Unit tests:
$ vendor/bin/phpunit
All versions of psr7-minify-middleware with dependencies
PHP Build Version
Package Version
The package adriansuter/psr7-minify-middleware contains the following files
Loading the files please wait ....