Hazaar\Controller\Response\Packer
CSSmin
Summary
MethodsPropertiesConstants
Constants
CLASSCOLON
CLASSCOLON : type

Type

\type - desc
COMMENT
COMMENT : type

Type

\type - desc
NL
NL : type

Type

\type - desc
QUERY_FRACTION
QUERY_FRACTION : type

Type

\type - desc
TOKEN
TOKEN : type

Type

\type - desc
Properties
$comments
$comments
$max_execution_time
$max_execution_time
$memory_limit
$memory_limit
$pcre_backtrack_limit
$pcre_backtrack_limit
$pcre_recursion_limit
$pcre_recursion_limit
$preserved_tokens
$preserved_tokens
$raise_php_limits
$raise_php_limits
$remove_last_semicolon
$remove_last_semicolon
Methods
__construct()
__construct($raise_php_limits = true, $remove_last_semicolon = true)
clamp_number()
clamp_number($n, $min, $max)
compress_hex_colors()
compress_hex_colors($css) : string
Utility method to compress hex color values of the form #AABBCC to #ABC or short color name.

DOES NOT compress CSS ID selectors which match the above pattern (which would break things). e.g. #AddressForm { ... }

DOES NOT compress IE filters, which have hex color values (which would break things). e.g. filter: chroma(color="#FFFFFF");

DOES NOT compress invalid hex values. e.g. background-color: #aabbccdd

do_raise_php_limits()
do_raise_php_limits()
Try to configure PHP to use at least the suggested minimum settings
extract_data_urls()
extract_data_urls($css) : string
Utility method to replace all data urls with tokens before we start

compressing, to avoid performance issues running some of the subsequent regexes against large strings chunks.

hsl_to_hex()
hsl_to_hex($matches)
hue_to_rgb()
hue_to_rgb($v1, $v2, $vh)
index_of()
index_of($haystack, $needle, $offset = 0) : int
PHP port of Javascript's "indexOf" function for strings only

Author: Tubal Martin http://blog.margenn.com

lowercase_common_functions()
lowercase_common_functions($matches)
lowercase_common_functions_values()
lowercase_common_functions_values($matches)
lowercase_directives()
lowercase_directives($matches)
lowercase_properties()
lowercase_properties($matches)
lowercase_pseudo_elements()
lowercase_pseudo_elements($matches)
lowercase_pseudo_first()
lowercase_pseudo_first($matches)
minify()
minify($css, $linebreak_pos) : string
Does bulk of the minification
normalize_int()
normalize_int($size) : int
Convert strings like "64M" or "30" to int values
replace_calc()
replace_calc($matches)
replace_colon()
replace_colon($matches)
replace_string()
replace_string($matches)
rgb_to_hex()
rgb_to_hex($matches)
round_number()
round_number($n)
run()
run($css = '', $linebreak_pos = false) : string
Minify a string of CSS
set_max_execution_time()
set_max_execution_time($seconds)
Sets the maximum execution time for this script
set_memory_limit()
set_memory_limit($limit)
Sets the memory limit for this script
set_pcre_backtrack_limit()
set_pcre_backtrack_limit($limit)
Sets the PCRE backtrack limit for this script
set_pcre_recursion_limit()
set_pcre_recursion_limit($limit)
Sets the PCRE recursion limit for this script
str_slice()
str_slice($str, $start = 0, $end = false) : string
PHP port of Javascript's "slice" function for strings only