PHP Class rmrevin\yii\minify\HtmlCompressor

Datei anzeigen Open project: rmrevin/yii2-minify-view Class Usage Examples

Public Methods

Method Description
compress ( string $data, null | array $options = null ) : string

Private Methods

Method Description
checkInsidePre ( $line ) : array
checkInsideTextarea ( $line ) : array
getLine ( &$data ) : boolean | string Returns the next line from an open file handle or a string
get_line ( &$data ) : boolean | string Returns the next line from an open file handle or a string
htmlCompress ( $data, null | array $options = null ) : boolean | mixed | string HTML Compressor 1.0.1 Original Author: Tyler Hall Edited by: Revin Roman Latest Source and Bug Tracker: http://github.com/tylerhall/html-compressor
html_compress ( $data, null | array $options = null ) : boolean | mixed | string

Method Details

compress() public static method

public static compress ( string $data, null | array $options = null ) : string
$data string is either a handle to an open file, or an HTML string
$options null | array key => value array of execute options The possible keys are: - `c` or `no-comments` - removes HTML comments - `s` or `stats` - output filesize savings calculation - `x` or `extra` - perform extra (possibly unsafe) compression operations Example: HtmlCompressor::compress($HtmlCode, $options = ['no-comments' => true])
return string