Reset an attribute value to its default
@param string $name Attribute name
@throws Exception
@return void
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);
		}
		
	}
481520
public function set($name)
    {
        if (!array_key_exists($name, $this->environments)) {
            throw new UndefinedEnvironmentException($name);
        }

        $this->current = $name;
        $this->environments[$name]->run();
    }
261396
public function offsetUnset($name)
    {
        $option = $this->findOption($name);

        if ($option instanceof Option) {
            unset($this->options[$option->getName()]);
        }
    }
181781
public function setName($name)
    {
        $this->name = $name;

        if ($this->id === null) {
            $this->id = $name;
        }
    }
1141711
public function offsetUnset($name)
	{
		$name = $this->resolveAlias($name);

		if (!$this->offsetExists($name))
		{
			return;
		}

		parent::offsetUnset($name);
	}
69365
protected function setAttrName($attrName)
	{
		if (!property_exists($this, 'attrName'))
		{
			throw new RuntimeException("Unknown property 'attrName'");
		}

		$this->attrName = AttributeName::normalize($attrName);
	}
133566
public function setAttrData(string $name, ?string $value): void
  {
    $this->attributes['data-'.$name] = $value;
  }
205209
public function reset($name = null) {
		if ($name === 'violations') {
			$this->_violations = array();
		} elseif ($name === 'warnings') {
			$this->_warnings = array();
		} else {
			$this->_violations = array();
			$this->_warnings = array();
		}
	}
737457
public function removeAttribute($name)
    {
        if (isset($this->attributes[$name])) {
            unset($this->attributes[$name]);
        }

        return $this;
    }
46331
public function offsetUnset($name)
    {
        if ($this->offsetExists($name)) {
            $value = $this->values[$name];

            if (is_object($value)) {
                $this->shared->detach($value);
                $this->protected->detach($value);
            }

            unset($this->keys[$name], $this->values[$name], $this->frozen[$name], $this->raw[$name]);
        }
    }
595087
public function setAttribute($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $key => $value) {
                $this->setAttribute($key, $value);
            }
        } else {
            $method = 'set'.ucfirst($name);
            if (method_exists($this, 'set'.ucfirst($name))) {
                $this->attributes[$name] = $this->{$method}($value);
            } else {
                $this->attributes[$name] = $value;
            }
        }

        return $this;
    }
1228487
public function setAttribute( $name, $value )
    {
        if ( isset( $this->dynamicAttributeFunctions[$name] ) )
        {
            switch ( $name )
            {
                case 'valid_nodes':
                    $this->dynamicAttributeFunctions[$name] = $value;
                    break;
                default:
                break;
            }
        }
        else
        {
            $this->attributes[$name] = $value;
        }
    }
176694
protected function setAttribute(string $name, $value) : void
    {
        // Convert values
        switch ($name) {
            case 'name':
                // no break here
            case 'value':
                $value = (string) $value;
                break;
            case 'prefixed':
                $value = (boolean) $value;
                break;
        }

        $this->$name = $value;
    }
467460
public function setNameAttribute(string $name)
    {
        $this->attributes['name'] = $name;
        $this->slug = $slug = str_slug($name);

        if ($this instanceof Model && self::sameSlugs($this, $slug)->exists()) {
            $similarSlugs = self::similarSlugs($this, $slug);
            $postfix = 1;
            $this->slug = $slug.$postfix;
            while ($similarSlugs->has($this->slug)) {
                $postfix++;
                $this->slug = $slug.$postfix;
            }
        }
    }
628674
public function removeAttribute($name) {
		if ($this->_attributes === null) {
			$this->initAttributes();
		}
		
		unset($this->_attributes[$name]);
		
		return $this;
	}
220464
public function setAttribute($name, $value)
    {
        $this->throwExceptionIfAttributeDosntExist($name);
        
        $class = get_class($this);
        if(isset(self::$attributeSetters[$class][$name]))
        {
            $methodName = self::$attributeSetters[$class][$name];
            $this->$methodName($value);
        }
        else
        {
            $this->setAttributeDirectly($name, $value);
        }

        return $this;
    }
810453
public function delete($name)
    {
        $name = $this->parseName($name);
        ObjectArrayHelper::remove($this->data, $name);
        $this->isChanged = true;
    }