private function CSSmin::normalize_int in Advanced CSS/JS Aggregation 6
Same name and namespace in other branches
- 8.2 advagg_css_minify/yui/CSSMin.inc \CSSmin::normalize_int()
- 8.3 advagg_css_minify/yui/CSSMin.inc \CSSmin::normalize_int()
Convert strings like "64M" or "30" to int values
Parameters
mixed $size:
Return value
int
2 calls to CSSmin::normalize_int()
- CSSmin::do_raise_php_limits in advagg_css_compress/
yui/ CSSMin.inc - Try to configure PHP to use at least the suggested minimum settings
- CSSmin::set_memory_limit in advagg_css_compress/
yui/ CSSMin.inc - Sets the memory limit for this script
File
- advagg_css_compress/
yui/ CSSMin.inc, line 716
Class
Code
private function normalize_int($size) {
if (is_string($size)) {
switch (substr($size, -1)) {
case 'M':
case 'm':
return $size * 1048576;
case 'K':
case 'k':
return $size * 1024;
case 'G':
case 'g':
return $size * 1073741824;
}
}
return (int) $size;
}