Adds a value to the attribute.
@param string $attribute
@param string $value
@return $this
354671
public function addAttributeValue(string $attribute, string $value = ''): self
    {
        // Retrieve the current values of the attribute
        $values = $this->getAttribute($attribute);

        // Merge the values
        if (! in_array($value, $values)) {
            $values[] = $value;
        }

        // Store the new values
        $this->setAttribute($attribute, $values);

        return $this;
    }
466331
public function prependAttribute($attr, $value)
    {
        $this->setAttribute($attr, trim($value . $this->getAttribute($attr)));

        return $this;
    }
1150344
public function addAttributes($name, $value)
    {
        if (empty($this->attributes[$name]))
            $this->attributes[$name] = [];

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

        return $this;
    }
11442
public function setAttribute(string $attribute, string $value = '')
    {
        $this->htmlAttributes->setAttribute($attribute, $value);

        return $this;
    }
532817
public function add( $key, $value ) {
		if ( ! array_key_exists( $key, $this->attributes ) ) {
			$this->attributes[ $key ] = $value;
		} else {
			if ( ! \is_array( $this->attributes[ $key ] ) ) {
				$this->attributes[ $key ] = array( $this->attributes[ $key ], $value );
			} else {
				$this->attributes[ $key ][] = $value;
			}
		}
	}
502246
public function whereEndsWith($attribute, string $value)
    {
        $this->data->must()->regexp($attribute, '.*' . $value);

        return $this;
    }
1255555
function addAttribute(Attribute $attribute)
    {
        $attribute->setRelation($this);
        $this->attributes[$attribute->getName()] = $attribute;
        return $this;
    }
459551
public function setAttribute(string $attribute, $value = []): self
    {
        $this->attributes[$attribute] = $this->wrap($value);

        return $this;
    }
1259588
public function addAttributes(array $attributes)
    {
        foreach ($attributes as $attribute => $value) {
            $this->addAttribute($attribute, $value);
        }

        return $this;
    }
1081679
public function whereContains($attribute, string $value)
    {
        $this->data->must()->match($attribute, $value);

        return $this;
    }
415528
public function setNewValue($attribute, $value)
    {
        $this->assertValidAttribute($attribute);

        $this->documentChangeSet[$attribute][1] = $value;
        $this->getDocumentManager()->getUnitOfWork()->setDocumentChangeSet($this->getDocument(), $this->documentChangeSet);
    }
547987
public function addAttr($name, $value)
    {
        $name = trim($name);
        $value = trim($value);

        if ($value && !$this->existsAttr($name)) {
            $this->attrs[$name] = $value;
        }

        return $this;
    }
8792
public function setAttribute($attribute, $value){
        if($attribute === 'table'){
            $this->_table = $value;
        }
        elseif($attribute === 'pk'){
            $this->_pk = $value;
        }
        elseif($attribute === 'relations'){
            $this->_relations = $value;
        }
        
        return $this;
    }
1274541
public function withAttribute($attribute, $value)
    {
        /** @var EvolvableLinkInterface $that */
        $that = clone($this);
        $that->attributes[$attribute] = $value;
        return $that;
    }
96069
public function whereStartsWith($attribute, string $value)
    {
        $this->data->must()->prefix($attribute, $value);

        return $this;
    }
699229
public function setParentAttribute(string $attribute, string $value = '')
    {
        $this->parentAttributes->setAttribute($attribute, $value);

        return $this;
    }
314510
public function addAttribute($attribute)
    {
        $attributes = $this->getAttributes();
        array_push($attributes, $attribute);
        $this->setAttributes($attributes);
    }