`resetChangeHistory` clears the change history for an attribute

@param   string  $attribute  attribute name

@return  $this
547553
function resetChangeHistory($attribute) {
    if ($this->propertyExists($attribute, 'changes')) {
        $this->setPropertyFor($attribute, 'changes', [], null, false);
    }

    return $this;
  }
1148503
public function mergeAttributes($attributes)
    {
        $attributes = self::prepareAttributes($attributes);
        foreach ($this->watchedAttributes as $watchedKey) {
            if (isset($attributes[$watchedKey])) {
                $this->onAttributeChange($watchedKey, $attributes[$watchedKey]);
                unset($attributes[$watchedKey]);
            }
        }
        $this->attributes = array_merge($this->attributes, $attributes);
        return $this;
    }
9768
public function clearErrors($attribute = null)
    {
        if ($attribute === null) {
            $this->errors = [];
        } else {
            unset($this->errors[$attribute]);
        }
    }
512571
public function syncOriginalAttributes($attributes)
    {
        $attributes = is_array($attributes) ? $attributes : func_get_args();

        foreach ($attributes as $attribute) {
            $this->original[$attribute] = $this->attributes[$attribute];
        }

        return $this;
    }
1325635
public function remove($attributes)
    {
        foreach ((array) $attributes as $attribute) {
            unset($this->defaults[$attribute],
                $this->types[$attribute],
                $this->requires[$attribute],
                $this->notNullables[$attribute]);
        }

        return $this;
    }
542741
public function setAttributes($attributes) {
		if (is_array($attributes) && empty($attributes)) {
			$this->attributes = new \stdClass;
		} else {
			$this->attributes = $attributes;
		}

		return $this;
	}
700643
public function removeAttribute($key)
    {
        if (!empty($this->attributes[$key])) {
            unset($this->attributes[$key]);
        }

        return $this;
    }
1066431
public function attributeIsDirty($attribute)
	{
		return $this->_dirty && isset($this->_dirty[$attribute]) && array_key_exists($attribute, $this->_attributes);
	}
197043
public function reset ($name)
	{
		
		// If the attribute doesn't exists
		
		if (!$this->attributeExists ($name))
		{
			throw new Exception (get_called_class () . '->' . $name . ' attribute does not exist!');
		}
		
		// If attribute reset is disabled
		
		if (!$this->attributeReset ($name))
		{
			throw new Exception (get_called_class () . '->' . $name . ' attribute reset is disabled!');
		}
		
		// If there is no default attribute value remove the value
		
		if (!array_key_exists ('default', static::$attributes[$name]))
		{
			unset ($this->attributeValues[$name]);
		}
		
		// Else there is a default attribute value so set it
		
		else
		{
			$this->iset ($name, static::$attributes[$name]['default'], FALSE);
		}
		
	}
628666
public function setAttribute(\Sulu\Bundle\ProductBundle\Entity\Attribute $attribute)
    {
        $this->attribute = $attribute;

        return $this;
    }
701206
public function setOldAttribute($data = null) {
        if (is_null($data)) {
            $data = $this->getAttribute();
        }
        $this->isNewRecord = false;
        $this->__oldAttributes = array_merge($this->__oldAttributes, $data);
        return $this;
    }
442651
public function on($attribute)
	{
		$errors = $this->$attribute;

		return $errors && count($errors) == 1 ? $errors[0] : $errors;
	}
1128688
public function attributeWas($attr)
    {
        return $this->attributeChanged($attr) ?
                $this->changedAttributes[$attr] :
                $this->getAttribute($attr);
    }
521383
public function setAttributes($attributes)
    {
        foreach ($attributes as $key => $string_values) {
            $values = explode(' ', $string_values);

            // Trim the values
            $values = array_map('trim', $values);
            // Remove empty elements
            $values = array_filter($values);
            // Remove duplicate values
            $values = array_unique($values);

            $this->attributes[$key] = $values;
        }

        return $this;
    }
1348689
public function removeAttribute() {
    $args = func_get_args();
    foreach ($args as $arg) {
      // Support arrays or multiple arguments.
      if (is_array($arg)) {
        foreach ($arg as $value) {
          unset($this->storage[$value]);
        }
      }
      else {
        unset($this->storage[$arg]);
      }
    }

    return $this;
  }
1013608
public function update($attributes)
    {
        $this->attributes = array_merge($this->attributes, array_filter($attributes, function ($attribute) {
            return ! is_null($attribute);
        }));

        return $this;
    }
501462
protected function resolveAttributeName($attribute)
    {
        $result = preg_grep("/^$attribute$/i", array_keys($this->attributes));
        if (empty($result)) {
            throw new InvalidArgumentException(sprintf('Unable to resolve attribute "%s".', $attribute));
        }

        return reset($result);
    }