Sets an attribute

@param string $name
@param string  $value
342031
public function setAttribute($name, $value)
    {
        if ($name == 'status') {
            $this->update($value);
        } else {
            $this->attributes[$name] = $value;
            $this->client->hmset($this->getHashKey(), array(
                $name     => $value,
                'updated' => time()
            ));
        }
    }
684628
private function set(string $name, $value):void{
		$method = 'magic_set_'.$name;

		if(\method_exists($this, $method)){
			$this->$method($value);
		}

	}
1023347
public function updateAttribute($name, $value)
	{
		$this->__set($name, $value);
		return $this->update(false);
	}
2282
public function addToAttribute($name, $value)
    {
        $attr = $this->getAttribute($name);
        $this->setAttribute($name, $attr . $value);

        return $this;
    }
725217
protected function setAttributeType($name, $value)
    {

        if (array_key_exists($name, $this->casts)) {
            if (in_array($this->casts[$name], $this->castTypes)) {
                settype($value, $this->casts[$name]);
            }
        }

        return $value;
    }
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;
    }
1221491
protected function setNameAttribute($name)
    {
        if( ! isset($this->settings['attr']['name']) && ! empty($name) )
        {
            $this->settings['attr']['name'] = $name;
        }
    }
941214
public function addAttribute($name = null, $value)
    {
        if ($value) {
            $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;
        }
    }
758369
public function setAttribute($name, ...$value)
    {
        $value = is_array(array_get($value, 0, '')) ? array_get($value, 0) : $value;
        $this->updateAttribute($name, $value, $this->getAttributeValueSeparator($name));

        return $this;
    }
1366451
public function setAttributes($name, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'array')
			->test(2, 'scalar', 'null');
		
		if(is_array($name)) {
			$this->attributes = $name;
			return $this;
		}
		
		$this->attributes[$name] = $value;
		return $this;
	}
1089710
public function attribute($name, $value=null)
    {
        if ($value === null) {
            unset($this->_attributes[$name]);
        } else {
            $this->_attributes[$name] = $value;
        }
    }
185520
public function set($name, $value)
    {
        $name = '_' . (string)$name;
        if (property_exists($this, $name) && (!is_array($this->$name))) {
            $this->$name = $value;
        }
        return $this;
    }
1328242
private function set($name, $value)
	{
		if (property_exists($this, $name))
		{
			$this->$name = $value;
			$this->attributes[$name] = $value;
			return true;
		}

		return false;
	}
317393
public function setAttribute(string $name, string $value) : Tag
    {
        $this->attributes[strtolower($name)] = $value;

        return $this;
    }
693071
public function setAttribute( $name, $value ) {
        if( strtolower( $name ) == 'value' ) {
            $this->setSelectedOption( $value );
        } else {
            parent::setAttribute( $name, $value );
        }
    }
1231351
public void setAttribute(String name, String value)
	{
		if (value != null)
			getElement().setAttribute(name, value);
		else
			getElement().removeAttribute(name);
	}