private function CSSCompression_Cleanup::removeMultipleDefinitions in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 6 advagg_css_compress/css-compressor-3.x/src/lib/Cleanup.inc \CSSCompression_Cleanup::removeMultipleDefinitions()
Removes multiple definitions that were created during compression
Parameters
(string) val: CSS Selector Properties:
1 call to CSSCompression_Cleanup::removeMultipleDefinitions()
- CSSCompression_Cleanup::cleanup in advagg_css_compress/
css-compressor-3.x/ src/ lib/ Cleanup.inc - Central cleanup process, removes all injections
File
- advagg_css_compress/
css-compressor-3.x/ src/ lib/ Cleanup.inc, line 168
Class
- CSSCompression_Cleanup
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private function removeMultipleDefinitions($val = '') {
$storage = array();
$arr = preg_split($this->rsemicolon, $val);
foreach ($arr as $x) {
if ($x) {
list($a, $b) = preg_split($this->rcolon, $x, 2);
$storage[$a] = $b;
}
}
if ($storage) {
$val = '';
foreach ($storage as $x => $y) {
$val .= "{$x}:{$y};";
}
}
// Return converted val
return $val;
}