You are here

public function CSSCompression_Combine::searchDefinitions 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::searchDefinitions()

Helper function to ensure all values of search array exist within the storage array

Parameters

(string) prop: CSS Property:

(array) storage: Array of definitions found:

(array) search: Array of definitions requred:

File

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

Class

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

Code

public function searchDefinitions($prop, $storage, $search) {

  // Return if storage & search don't match
  if (count($storage) != count($search)) {
    return false;
  }
  $str = "{$prop}:";
  foreach ($search as $value) {
    if (!isset($storage[$value]) || $this
      ->checkUncombinables($storage[$value])) {
      return false;
    }
    $str .= $storage[$value] . ' ';
  }
  return trim($str) . ';';
}