Set a key/value action attribute.

@param string $name  Attribute name
@param mixed  $value Attribute
@param string $glue  If glue is set, then if there's an old value it will be appended

@return LibBaseTemplateObject
355149
public function setAttribute($name, $value, $glue = false)
    {
        //get attributes
        $attrbs = AnConfig::unbox(pick($this->attribs, array()));

        //get the existing value
        $old = isset($attrbs[$name]) ? $attrbs[$name] : null;

        //if glue and existing value then stich the old and new using the glue
        if ($glue && $old) {
            $value = $old.(string) $glue.$value;
        }

        //put the attributes back
        $attrbs[$name] = $value;
        $this->attribs = $attrbs;

        return $this;
    }
1264660
public function setArgument($name, $value)
    {
        if (!$value instanceof \Closure) {
            $value = function () use ($value) {
                return $value;
            };
        }

        $this->arguments[$name] = $value;
        unset($this->caches[$name]);

        return $this;
    }
1307233
public function setAttribute($name, $value)
    {
        $primaryKeyNames = self::getPrimaryKeyName(true);

        $meta = self::getMeta();
        $name = $meta->getMappingName($name);

        if ($meta->hasField($name)) {
            $field = $meta->getField($name);
            $attributeName = $field->getAttributeName();

            if ($field->getSqlType()) {
                $platform = $this->getConnection()->getDatabasePlatform();
                $value = $field->convertToDatabaseValueSQL($value, $platform);

                if (in_array($attributeName, $primaryKeyNames)) {
                    // If new primary key is empty - mark model as new
                    if (empty($value)) {
                        $this->setIsNewRecord(true);
                    } elseif ($this->getAttribute($attributeName) != $value) {
                        // If current model isn't new and new primary key value != new value - mark model as new
                        $this->setIsNewRecord(true);
                    }
                }

                $this->attributes->setAttribute($attributeName, $value);
            } else {
                $this->related[$name] = $value;
            }
        } else {
            throw new Exception(get_class($this).' has no attribute named "'.$name.'".');
        }
    }
318165
public function set( $name, $value )
	{
		$name = trim( $name, '/' );

		if( $value !== null )
		{
			$this->_cache[ $name ] = $value;

			if( isset( $this->_negCache[ $name ] ) ) {
				unset( $this->_negCache[ $name ] );
			}
		}
		else
		{
			$this->_negCache[ $name ] = true;
		}

		$this->_getObject()->set( $name, $value );
	}
996655
public function setParam($name, $value) {
		$this->payload['params'][$name] = Trustly_Data::ensureUTF8($value);
		return $value;
	}
517435
public function set($name, $value = null)
	{
		is_null($name) or \Arr::set($this->data, $name, $value);

		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;
    }
205527
public function _set($name, $value)
    {
        $property = $this->getReflectionProperty($name);
        return $property->setValue($this->getObject(), $value);
    }
204766
public function setAttribute( string $name, $value )
   {

      if ( ! $this->_supportedAttributes->has( $name ) )
      {
         // Unknown attribute
         throw new ArgumentException(
            'name', $name, 'Can not set the DB driver "' . $this->_type . '" not supports a attribute with this name!'
         );
      }

      if ( ! $this->_supportedAttributes->get( $name )->validateValue( $value ) )
      {
         // Invalid value
         throw new ArgumentException(
            'value', $value, 'Can not set the DB driver "' . $this->_type . '" attribute "' . $name .
                             '" value, because the value is invalid!'
         );
      }

      $this->_attributes[ $name ] = $value;

      return $this;

   }
527350
final public function set($name, $value)
    {
        $method = 'set'.ucfirst($name);
        if(!method_exists($this, $method) ) {
            parent::set($name, $value);
        } else {
            $this->$method($value);
        }

        return $this;
    }
220768
public function set($name, $value)
  {
    if (is_null($value)) {
      unset($this->vars[$name]);
    } else {
      $this->vars[$name] = $value;
    }

    return $this;
  }
748999
public function setSingleton($name, $value)
	{
		if (is_string($value) && class_exists($value)) {
			return $this->container->bindSingleton($name, $value);
		}

		return $this->container->singleton($name, $value);
	}
1256152
public function setAttribute($name, $value)
    {
        foreach ($this as $node) {
            if ($node instanceof \DOMElement) {
                /** @var \DOMElement $node */
                $node->setAttribute($name, $value);
            }
        }
        return $this;
    }
1106576
public function add($name, $value)
    {
        if ($this->has($name)) {
            $this->updateAttribute($name, $value);
        }
        else {
            $this->makeAttribute($name, $value);
        }

        return $this;
    }
284210
public function setAttribute(string $name, string $value) : Label
    {
        $this->tag->setAttribute($name, $value);

        return $this;
    }
1151512
public function setAttr($name, $value = null)
    {
        $wrapper = $this->getWrapper();
        
        // set attribute.
        $wrapper[$name] = $value;

        return $this->setWrapper($wrapper);
    }
100774
public function setParam($name, $value)
	{
		if (null === $this->params)
		{
			$this->params = $this->loadParams();
		}

		$this->params->set($name, $value);

		return $this;
	}