Minify
in package
Class Minify.
Tags
Table of Contents
- all() : string
- Minify all contents, optionally can disable any.
- css() : string
- Minify CSS.
- html() : string
- Minify HTML.
- js() : string
- Minify JavaScript.
Methods
all()
Minify all contents, optionally can disable any.
public
static all(string $contents[, bool $enableHtml = true ][, bool $enableJs = true ][, bool $enableCss = true ]) : string
Make preference to use html() if you have not css and js code and have HTML5 tags.
Parameters
- $contents : string
- $enableHtml : bool = true
- $enableJs : bool = true
- $enableCss : bool = true
Return values
string —css()
Minify CSS.
public
static css(string $input) : string
Parameters
- $input : string
Tags
Return values
string —html()
Minify HTML.
public
static html(string $input) : string
Parameters
- $input : string
Tags
Return values
string —js()
Minify JavaScript.
public
static js(string $input) : string
Be careful: This method doesn't support "javascript automatic semicolon insertion", you must add semicolon by yourself, otherwise your javascript code will not work and generate error messages.
Parameters
- $input : string