/* SETTER
***********************************************************************
354463
public function setUri($uri)
    {
        if (in_array($uri, $this->uris, TRUE)) {
            throw new \Exception('Redirecting loop detected');
        }
        $this->uris[] = $uri;
        return $this;
    }
605038
public function set($key, $value)
    {
        Assume::that(is_scalar($key));
        if (isset($this->emptySubset)) {
            $this->createTrueSubset();
        }
        $oldValue = null;
        if (isset($this->data[$key])) {
            $oldValue = $this->data[$key];
        }
        if (isset($key) and isset($value) and $key !== '') {
            $this->data[$key] = $value;
        } else {
            $this->data[$key] = null;
        }
        if (! $this->root->updated and $oldValue !== $value) {
            $this->root->updated = true;
            $this->root->update();
        }
    }
1081692
public function set($key, $value)
    {
        $method = 'setter' . ucfirst($key);
        if (method_exists($this, $method)) {
            $value = $this->$method($value);
        }
        $this->setRaw($key, $value);
    }
1325558
public function _set($name, $value)
    {
        $object = $this->getObject();
		$callable = function() use ($name, $value, $object) {
			if (!property_exists($object, $name) && !method_exists($object, '__set'))
			{
				throw new \Exception('Property ' . $name . ' doesn\'t exist on object of class ' . get_class($object));
			}
			$object->$name = $value;
		};
		$this->breakScopeAndExecute($callable);
    }
234613
function setClass( $value, $params=FALSE ) {
    $this->class['value']  = $value;
    $this->class['params'] = $this->_setParams( $params );
  }
237386
function setValue(descriptor,key,set,update)
        {
          var _descriptor = descriptor,
              _key = key,
              _set = set,
              _update = update,
              _oldValue;
          return function valueSet(v)
          {
            _oldValue = _descriptor.value;
            if(_set(this,_key,v,_oldValue,arguments,this._stopChange))
            {
              _descriptor.value = v;
            }
            if(!this._stopChange)
            {
              _update(this,_key,v,_oldValue,arguments);
            }
            this._stopChange = undefined;
          }
        }
454169
public function setValue($value) : void
    {
        if (is_object($value) && !($value instanceof ArrayObject)) {
            $this->class = $value;
            if (isset($this->value)) {
                $old = clone $this->value;
                $work = clone $value;
                if ($work instanceof JsonSerializable) {
                    $work = $work->jsonSerialize();
                }
                foreach ($work as $prop => $status) {
                    $value->$prop = isset($old->$prop) ? $old->$prop : false;
                }
            }
            $this->value = $value;
        }
        if (!isset($this->value)) {
            $this->value = clone $this->class;
        }
        if (is_array($value) || $value instanceof ArrayObject) {
            $work = clone $this->value;
            if ($work instanceof JsonSerializable) {
                $work = $work->jsonSerialize();
            }
            foreach ($work as $prop => $status) {
                $this->value->$prop = false;
            }
            foreach ($value as $prop) {
                if (is_string($prop) && $this->hasBit($prop) && isset($this->value->$prop)) {
                    $this->value->$prop = true;
                }
            }
        }
        $found = [];
        foreach ((array)$this as $element) {
            if ($element->getElement() instanceof Hidden) {
                continue;
            }
            $check = $element->getElement()->getValue();
            if (isset($this->value->$check) && $this->value->$check) {
                $element->getElement()->check();
            } else {
                $element->getElement()->check(false);
            }
            $found[] = $check;
        }
    }
433387
function makeSetter(setters, selector, view) {
  setters = parseSetters(setters, view);

  return setters.length < 1 ? undefined : function (model, value, data) {
    if (data && data.internal) return;

    const $el = this.$(selector);

    if ($el.length < 1) return;

    setters.forEach((fnc) => {
      fnc($el, value);
    });
  };
}
589027
function setOptions(object, options) {
      options = object.options = _.assign({}, cloneDeep(object.constructor.options), cloneDeep(options));

      _.forOwn(options, function(value, key) {
        if (value != null) {
          // Add event listeners.
          if (/^on[A-Z]/.test(key)) {
            _.each(key.split(' '), function(key) {
              object.on(key.slice(2).toLowerCase(), value);
            });
          } else if (!_.has(object, key)) {
            object[key] = cloneDeep(value);
          }
        }
      });
    }
1029307
function _set_property(itemsObject, name, value) {
  const nameArray = name.split(".");
  if (nameArray[1]) {
    itemsObject[nameArray[0]][nameArray[1]] = value;
  } else {
    itemsObject[name] = value;
  }
}
1331175
function (name, newValue) {
		var property = this.getProperty(name);
		if (!property) {
			this.initProperty(name, newValue);
		}
		else {
			property.set(newValue);
		}
	}
1226649
public function set($name, $value=null, $locale=null, $hook=true, $change=true, $silentException=false) {
		if(is_string($name))
			$name = strtolower($name);

		#setting multiple properties at once
		if(is_array($name)) {
			$vars = $name;
			$locale = $value;
			foreach($vars as $name=>$value)
				$this->set($name, $value, $locale, $hook);
			return $this;
		}

		#setting a property multiple translations at once
		if(is_array($locale)) {
			foreach($locale as $one)
				$this->set($name, $value[$one], $one, $hook);
			return $this;
		}

		$this->getDefinition()->processPreSet($this, $name, $value, $locale, $hook, $silentException);

		if($this->getDefinition()->hasProperty($name)) {
			if(!$locale)
				$locale = $this->getLocale();

			if($this->getDefinition()->property($name)->get('i18n') && $locale !== $this->getLocale()) {
				if($locale == 'all') {
					foreach($value as $locale => $v) {
						if(isset($this->data['translations'][$locale][$name]) && $v === $this->data['translations'][$locale][$name])
							continue;
						$this->data['translations'][$locale][$name] = $v;
						if($change) {
							if(!isset($this->translationschanged[$locale]))
								$this->translationschanged[$locale] = [];
							$this->translationschanged[$locale][$name] = true;
						}
					}
				}
				else {
					if(isset($this->data['translations'][$locale][$name]) && $value === $this->data['translations'][$locale][$name])
						return $this;
					$this->data['translations'][$locale][$name] = $value;
					if($change) {
						if(!isset($this->translationschanged[$locale]))
							$this->translationschanged[$locale] = [];
						$this->translationschanged[$locale][$name] = true;
					}
				}
			}
			else {
				if(isset($this->data['properties'][$name]) && $value === $this->data['properties'][$name])
					return $this;
				$this->data['properties'][$name] = $value;
				if($change) {
					if($this->getDefinition()->property($name)->get('i18n'))
						$this->translationschanged[$this->getLocale()][$name] = true;
					else
						$this->changed[$name] = true;
				}
			}
		}
		elseif($name !== 'translations' && $name !== 'properties') {
			if(is_array($value)) {
				$coll = new ManyCollection($this, $name);
				$value = $coll->setAll($value);
			}
			$this->data[$name] = $value;
		}

		return $this;
	}
612166
function setValue (obj, prop, value) {
  if (value !== undefined && obj[prop] === undefined) {
    obj[prop] = value
  }
}
1308336
function(attr, options) {
      (options || (options = {})).unset = true;
      return this.set(attr, null, options);
    }
1151340
public function set($key, $value)
    {
        $allowed = array_diff(array_keys(get_class_vars(get_class($this))), $this->_hidden);
        if (empty($allowed) || !empty($allowed) && in_array($key, $allowed)) {
            if (method_exists($this, 'set' . ucfirst($key))) {
                call_user_func_array([$this, 'set' . ucfirst($key)], [$value]);
            } else {
                $this->{$key} = self::modelize($key, $value);
            }
        }

        return $this;
    }
475405
function setAttributes(element, attributes) {
  Object.keys(attributes).forEach(function (prop) {
    var value = attributes[prop];
    if (value !== false) {
      element.setAttribute(prop, attributes[prop]);
    } else {
      element.removeAttribute(prop);
    }
  });
}
988858
function(initialValue, settings) {

		this.value = initialValue;

		this._set = settings.set || this._set;
		this._get = settings.get || this._get;

		// This allows updater to be called without any arguments.
		// selfUpdater flag can be set by things that want to call updater themselves.
		if(!settings.__selfUpdater) {
			var self = this,
				oldUpdater = this.updater;
			this.updater = function() {
				oldUpdater.call(self, self._get(), self.value);
			};
		}


		this._on = settings.on ? settings.on : this._on;
		this._off = settings.off ? settings.off : this._off;
	}