private function CSSCompression_Compress::setup in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 6 advagg_css_compress/css-compressor-3.x/src/lib/Compress.inc \CSSCompression_Compress::setup()
Runs css through initial setup handlers
Parameters
(string) css: Sheet to compress:
1 call to CSSCompression_Compress::setup()
- CSSCompression_Compress::compress in advagg_css_compress/
css-compressor-3.x/ src/ lib/ Compress.inc - Centralized function to run css compression.
File
- advagg_css_compress/
css-compressor-3.x/ src/ lib/ Compress.inc, line 102
Class
- CSSCompression_Compress
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private function setup($css) {
// Initial stats
$this->stats['before']['time'] = microtime(true);
$this->stats['before']['size'] = strlen($css);
// Initial trimming
$css = $this->Trim
->trim($css);
// Do a little tokenizing, compress each property individually
$setup = $this->Setup
->setup($css);
// Mark number of selectors pre-combine
$this->stats['before']['selectors'] = count($setup['selectors']);
return $setup;
}