You are here

public function CSSCompression_Combine::combine in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 7 advagg_css_compress/css-compressor-3.x/src/lib/Combine.inc \CSSCompression_Combine::combine()

Reads through each detailed package and checks for cross defn combinations

Parameters

(array) selectors: Array of selectors:

(array) details: Array of details:

1 call to CSSCompression_Combine::combine()
CSSCompression_Combine::access in advagg_css_compress/css-compressor-3.x/src/lib/Combine.inc
Access to private methods for testing

File

advagg_css_compress/css-compressor-3.x/src/lib/Combine.inc, line 100

Class

CSSCompression_Combine
CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com

Code

public function combine(&$selectors = array(), &$details = array()) {
  foreach ($details as $i => &$value) {
    if (isset($selectors[$i]) && strpos($selectors[$i], $this->token) === 0) {
      continue;
    }
    foreach ($this->methods as $option => $class) {
      if ($this->options[$option]) {
        $value = $this->{$class}
          ->combine($value);
      }
    }
  }
  return array(
    $selectors,
    $details,
  );
}