[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/minify/lib/ -> CSSmin.php (summary)

(no description)

File Size: 777 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CSSmin:: (29 methods):
  __construct()
  run()
  set_memory_limit()
  set_max_execution_time()
  set_pcre_backtrack_limit()
  set_pcre_recursion_limit()
  do_raise_php_limits()
  minify()
  extract_data_urls()
  compress_hex_colors()
  replace_string()
  replace_colon()
  replace_calc()
  preserve_old_IE_specific_matrix_definition()
  replace_keyframe_zero()
  rgb_to_hex()
  hsl_to_hex()
  lowercase_pseudo_first()
  lowercase_directives()
  lowercase_pseudo_elements()
  lowercase_common_functions()
  lowercase_common_functions_values()
  lowercase_properties()
  hue_to_rgb()
  round_number()
  clamp_number()
  index_of()
  str_slice()
  normalize_int()


Class: CSSmin  - X-Ref

__construct($raise_php_limits = TRUE)   X-Ref

param: bool|int $raise_php_limits

run($css = '', $linebreak_pos = FALSE)   X-Ref
Minify a string of CSS

param: string $css
param: int|bool $linebreak_pos
return: string

set_memory_limit($limit)   X-Ref
Sets the memory limit for this script

param: int|string $limit

set_max_execution_time($seconds)   X-Ref
Sets the maximum execution time for this script

param: int|string $seconds

set_pcre_backtrack_limit($limit)   X-Ref
Sets the PCRE backtrack limit for this script

param: int $limit

set_pcre_recursion_limit($limit)   X-Ref
Sets the PCRE recursion limit for this script

param: int $limit

do_raise_php_limits()   X-Ref
Try to configure PHP to use at least the suggested minimum settings


minify($css, $linebreak_pos)   X-Ref
Does bulk of the minification

param: string $css
param: int|bool $linebreak_pos
return: string

extract_data_urls($css)   X-Ref
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.

param: string $css
return: string

compress_hex_colors($css)   X-Ref
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

param: string $css
return: string

replace_string($matches)   X-Ref
No description

replace_colon($matches)   X-Ref
No description

replace_calc($matches)   X-Ref
No description

preserve_old_IE_specific_matrix_definition($matches)   X-Ref
No description

replace_keyframe_zero($matches)   X-Ref
No description

rgb_to_hex($matches)   X-Ref
No description

hsl_to_hex($matches)   X-Ref
No description

lowercase_pseudo_first($matches)   X-Ref
No description

lowercase_directives($matches)   X-Ref
No description

lowercase_pseudo_elements($matches)   X-Ref
No description

lowercase_common_functions($matches)   X-Ref
No description

lowercase_common_functions_values($matches)   X-Ref
No description

lowercase_properties($matches)   X-Ref
No description

hue_to_rgb($v1, $v2, $vh)   X-Ref
No description

round_number($n)   X-Ref
No description

clamp_number($n, $min, $max)   X-Ref
No description

index_of($haystack, $needle, $offset = 0)   X-Ref
PHP port of Javascript's "indexOf" function for strings only
Author: Tubal Martin http://blog.margenn.com

param: string $haystack
param: string $needle
param: int    $offset index (optional)
return: int

str_slice($str, $start = 0, $end = FALSE)   X-Ref
PHP port of Javascript's "slice" function for strings only
Author: Tubal Martin http://blog.margenn.com
Tests: http://margenn.com/tubal/str_slice/

param: string   $str
param: int      $start index
param: int|bool $end index (optional)
return: string

normalize_int($size)   X-Ref
Convert strings like "64M" or "30" to int values

param: mixed $size
return: int



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1