Horde_CssMinify_CssParser
extends Horde_CssMinify
in package
CSS minification driver implemented by using the Horde/Css_Parse library.
Tags
Table of Contents
- $_data : mixed
- Original CSS data.
- $_opts : array<string|int, mixed>
- Minification options.
- __construct() : mixed
- Constructor.
- __toString() : mixed
- minify() : string
- Return the minified CSS.
- setOptions() : mixed
- Set minification options.
- _minify() : mixed
Properties
$_data
Original CSS data.
protected
mixed
$_data
$_opts
Minification options.
protected
array<string|int, mixed>
$_opts
= array()
Methods
__construct()
Constructor.
public
__construct(mixed $css[, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
- $css : mixed
-
Either a string (the CSS text to compress) or an array of URLs (keys) to filenames (values) containing the CSS data to compress.
- $opts : array<string|int, mixed> = array()
-
Additional options. See setOptions().
Return values
mixed —__toString()
public
__toString() : mixed
Tags
Return values
mixed —minify()
Return the minified CSS.
public
minify() : string
Return values
string —Minified CSS.
setOptions()
Set minification options.
public
setOptions([array<string|int, mixed> $opts = array() ]) : mixed
Parameters
- $opts : array<string|int, mixed> = array()
-
Driver specific options:
- dataurl: (callback) A callback function to convert a URI to a data URL. Takes one argument (URI) and returns the data URI to be used in the file. - import: (callback) A callback function to convert a URI to a pathname. Takes one argument (URI) and expects an array back with two elements (URI, filename).
Return values
mixed —_minify()
protected
_minify(mixed $data) : mixed
Parameters
- $data : mixed