private function CSSCompression_Individuals::clip in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 6 advagg_css_compress/css-compressor-3.x/src/lib/Individuals.inc \CSSCompression_Individuals::clip()
Special clip conversions
Parameters
(string) val: property value:
1 call to CSSCompression_Individuals::clip()
- CSSCompression_Individuals::individuals in advagg_css_compress/
css-compressor-3.x/ src/ lib/ Individuals.inc - Runs special unit/directional compressions
File
- advagg_css_compress/
css-compressor-3.x/ src/ lib/ Individuals.inc, line 245
Class
- CSSCompression_Individuals
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private function clip($val) {
if (preg_match($this->rclip, $val, $match)) {
$positions = array(
1,
3,
5,
7,
);
$clean = 'rect(';
foreach ($positions as $pos) {
if (!isset($match[$pos])) {
return $val;
}
$clean .= $this->Numeric
->numeric($match[$pos]) . (isset($match[$pos + 1]) ? $match[$pos + 1] : '');
}
$val = $clean . ')';
}
return $val;
}