private function CSSCompression_Combine_List::replace in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 6 advagg_css_compress/css-compressor-3.x/src/lib/Combine/List.inc \CSSCompression_Combine_List::replace()
Build the replacement string for list props
Parameters
(string) val: Rule Set:
1 call to CSSCompression_Combine_List::replace()
- CSSCompression_Combine_List::combine in advagg_css_compress/
css-compressor-3.x/ src/ lib/ Combine/ List.inc - Combines multiple list style props into single definition
File
- advagg_css_compress/
css-compressor-3.x/ src/ lib/ Combine/ List.inc, line 67
Class
- CSSCompression_Combine_List
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private function replace($val) {
$storage = array();
$pos = 0;
// Find all possible occurences and build the replacement
while (preg_match($this->rlist, $val, $match, PREG_OFFSET_CAPTURE, $pos)) {
$storage[$match[2][0]] = $match[3][0];
$pos = $match[0][1] + strlen($match[0][0]) - 1;
}
// Run background checks and get replacement str
foreach ($this->groupings as $props) {
if ($replace = $this->Combine
->searchDefinitions('list-style', $storage, $props)) {
return $replace;
}
}
return false;
}