You are here

public function CSSCompression_Control::set in Advanced CSS/JS Aggregation 7

Same name and namespace in other branches
  1. 6 advagg_css_compress/css-compressor-3.x/src/lib/Control.inc \CSSCompression_Control::set()

The setter method only allows access to setting values in the options array

Parameters

(string) name: Key name of the option you want to set:

(mixed) value: Value of the option you want to set:

File

advagg_css_compress/css-compressor-3.x/src/lib/Control.inc, line 121

Class

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

Code

public function set($name, $value) {

  // Allow for passing array of options to merge into current ones
  if ($name === 'options' && is_array($value)) {
    return $this->Option
      ->merge($value);
  }
  else {
    if (isset(CSSCompression::$defaults[$name])) {
      return $this->Option
        ->option($name, $value);
    }
    else {
      throw new CSSCompression_Exception("Invalid Private Access to {$name} in CSSCompression.");
    }
  }
}