Pass in an attribute value for conversion

@param string $attribute Attribute name
@param string $value Attribute value to assign

@return Compound
334868
public function setAttribute($attribute, $value): Compound
    {
        if ($attribute !== 'link') {
            $this->attributes[$attribute] = $value;
        } else {
            $this->isLink = true;
            $this->link = $value;
        }

        return $this;
    }
823256
public function createAttributeValue(Attribute $attribute, $value, $locale)
    {
        $attributeValue = $this->attributeValueRepository->createNew();
        $attributeValue->setAttribute($attribute);
        $this->entityManager->persist($attributeValue);
        $attribute->addValue($attributeValue);
        $this->setOrCreateAttributeValueTranslation($attributeValue, $value, $locale);

        return $attributeValue;
    }
1274541
public function withAttribute($attribute, $value)
    {
        /** @var EvolvableLinkInterface $that */
        $that = clone($this);
        $that->attributes[$attribute] = $value;
        return $that;
    }
199102
protected function formatAttributeValue(Attribute $attribute)
    {
        $value = $attribute->getValue();
        
        if ($attribute->getType() === Attribute::TYPE_FUNCTION && strlen($value)) {
            return new Expr($value);
        }
        
        return $value;
    }
291724
public function setAttribute($attribute, $value)
    {
        // Give mutator priority over custom casts
        if ($this->hasSetMutator($attribute)) {
            $method = 'set' . studly_case($attribute) . 'Attribute';

            return $this->{$method}($value);
        }

        if (array_key_exists($attribute, $this->filterCustomCasts())) {
            /** @var $customCastObject CustomCastBase */
            $customCastObject = $this->getCustomCastObject($attribute);

            $this->attributes[$attribute] = $customCastObject->setAttribute($value);

            return $this;
        }

        parent::setAttribute($attribute, $value);
    }
102607
public function set_attribute($attr, $value = null)
	{
		$attr = is_array($attr) ? $attr : array($attr => $value);
		foreach ($attr as $key => $value)
		{
			if ($value === null)
			{
				unset($this->attributes[$key]);
			}
			else
			{
				$this->attributes[$key] = $value;
			}
		}

		return $this;
	}
394123
private function prepareSimpleIndexAttributeValue(AttributeInterface $attribute, $value)
    {
        if ($this->getFieldType($attribute) == FieldInterface::FIELD_TYPE_BOOLEAN) {
            $value = boolval($value);
        } elseif ($attribute->getBackendType() == 'decimal') {
            $value = floatval($value);
        } elseif ($attribute->getBackendType() == 'int') {
            $value = intval($value);
        }

        return $value;
    }
299766
public function attr($name, $value = null)
    {
        if (func_num_args() < 2) {
            return @$this->attributes[$name];
        } else {
            if (is_null($value)) {
                unset($this->attributes[$name]);
            } else {
                $this->attributes[$name] = $value;
            }
            return $this;
        }
    }
311489
public function setAttribute($attr, $value)
    {

        $attr = strtolower($attr);

        if(is_null($value)) {
            unset($this->attributes[$attr]);
        }
        else {
            $this->attributes[$attr] = $value;
        }

        return $this;

    }
267596
public function changing($attribute, $value)
    {
        $this->setToken('Attribute', $attribute);
        $this->setToken('Value', $value);

        return $this;
    }
722763
public function setValueIfAttributeExists($attribute, $value)
    {
        if ($this->hasAttribute($attribute)) {
            $currentValue = $this->getAttribute('value');

            $this->setAttribute('value', $currentValue + $value);
        }
    }
272726
public function setAttribute($attribute, $value = null)
    {
        if (is_array($attribute)) {
            $this->attributes = array_merge_recursive($this->attributes, $attribute);

            return $this;
        }

        if (is_array($value)) {
            $old = $this->attributes[$attribute] ?? [];
            $this->attributes[$attribute] = array_merge((array) $old, $value);
        } else {
            $this->attributes[$attribute] = $value;
        }

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

        return $this;
    }
1086312
public function setAttribute(string $attribute, string $value = '')
    {
        if ($attribute === 'class') {
            $this->addClass($value);

            return $this;
        }

        $this->attributes[$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);
    }
1045060
public function filter($attribute, $value)
    {
        $filter = $attribute . ':' . (is_array($value) ? implode(',', $value) : $value);

        if ($this->offsetExists('filter')) {
            $filter = $this->offsetGet('filter') . ';' . $filter;
        }

        $this->offsetSet('filter', $filter);

        return $this;
    }
96069
public function whereStartsWith($attribute, string $value)
    {
        $this->data->must()->prefix($attribute, $value);

        return $this;
    }