Sets an attribute and apply the name converter if necessary.

@param array  $data
@param string $attribute
@param mixed  $attributeValue

@return array
328525
protected function updateData(array $data, $attribute, $attributeValue)
    {
        if ($this->nameConverter) {
            $attribute = $this->nameConverter->normalize($attribute);
        }

        $data[$attribute] = $attributeValue;

        return $data;
    }
28474
public function updateByAttribute($attributeKey, $attributeValue, array $params)
	{
		$params['key_attribute'] = $attributeKey;
		$params['key_value']     = $this->wrapAttributeValueWithQuotes($attributeValue);

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

        $this->documentChangeSet[$attribute][1] = $value;
        $this->getDocumentManager()->getUnitOfWork()->setDocumentChangeSet($this->getDocument(), $this->documentChangeSet);
    }
146345
public Targeting addAttributes(String attributeName, String attributeValue){
        attributesMap.put(attributeName,attributeValue);
        return this;
    }
17349
private function appendAttribute($attrName, $attrValue)
    {
        $xml1 = defined('ENT_XML1') ? ENT_XML1 : 16;

        $attrName = htmlspecialchars($attrName, $xml1 | ENT_COMPAT);
        $attrValue = htmlspecialchars($attrValue, $xml1 | ENT_COMPAT);

        $this->outString .= ' '.$attrName.'="'.$attrValue.'"';
    }
1356679
function SetButtonAttribute($optValue, $attribute, $value) {
        if (!isset($this->fieldAttributes[$optValue])) {
            $this->fieldAttributes[$optValue] = array();
        }
        $this->fieldAttributes[$optValue][$attribute] = $value;
    }
877664
public function set_attr( $attribute, $value = null ) {
		if ( is_null( $value ) || $value === false ) {
			if ( array_key_exists( $attribute, $this->attr ) ) {
				unset( $this->attr[$attribute] );
			}
		} else {
			if ( $value === true ) {
				$value = $attribute;
			}
			$this->attr[ $attribute ] = $value;
		}
		
		return $this;
	}
636693
public function writeAttribute(string $attributeName, string $attributeValue): XmlStreamWriter
    {
        return $this->append(
                function(\DOMElement $parent) use ($attributeName, $attributeValue)
                {
                    $parent->setAttribute(
                            $attributeName,
                            $this->encode($attributeValue)
                    );
                },
                'attribute: "' . $attributeName . ':' . $attributeValue . '"'
        );
    }
517129
function setAttribute( $attributeName, $attributeValue )
    {
        if ( in_array( $attributeName,
                       array( 'alternative_text',
                              'original_filename' ) ) )
        {
            $aliasList = $this->aliasList();
            foreach ( array_keys( $aliasList ) as $aliasName )
            {
                $this->setAliasAttribute( $aliasName, $attributeName, $attributeValue );
            }
            if ( $attributeName == 'alternative_text' )
            {
                $text = $this->displayText( $attributeValue );
                foreach ( array_keys( $aliasList ) as $aliasName )
                {
                    $this->setAliasAttribute( $aliasName, 'text', $text );
                }
            }
            $this->recreateDOMTree();
            $this->setStorageRequired();
            return true;
        }
        return false;
    }
164787
private function processSerializeTypeObject(Type\Object $objectType, $object, array $data, string $attribute): array
    {
        return $this->setArrayAndCheckNull($data, $object->{$objectType->getter()}(), $attribute);
    }
314992
public function setAttribute( $attr, $value ) {
        //data-* attribute or in valid attribute array
        if( strpos( $attr, 'data-' ) === 0 || in_array( $attr, $this->validAttributes ) ) {
            $this->attrs[$attr] = $value;
        } else {
            throw new Exception\InvalidAttributeException( $attr );
        }
    }
183596
public function addAttributeValue(AttributeValueInterface $attributeValue)
    {
        if (!$this->attributeValues->contains($attributeValue)) {
            $attributeValue->setSubject($this);
            $this->attributeValues->add($attributeValue);
        }

        return $this;
    }
313672
private function retrieveAttributeValueTranslationByLocale(AttributeValue $attributeValue, $locale)
    {
        foreach ($attributeValue->getTranslations() as $attributeValueTranslation) {
            if ($attributeValueTranslation->getLocale() === $locale) {
                return $attributeValueTranslation;
            }
        }

        return null;
    }
841219
public void addAttributeValuesToSaml2Attribute(final String attributeName,
                                                   final Object attributeValue,
                                                   final String valueType,
                                                   final List<XMLObject> attributeList) {
        addAttributeValuesToSamlAttribute(attributeName, attributeValue, valueType, attributeList, AttributeValue.DEFAULT_ELEMENT_NAME);
    }
1306626
public function setAttribute($attribute, $value)
    {
        switch($attribute){

            case Core::ATTR_AUTO_ACCESSOR_OVERRIDE:
            case Core::ATTR_AUTO_FREE_QUERY_OBJECTS:
            case Core::ATTR_AUTOCOMMIT:
            case Core::ATTR_AUTOLOAD_TABLE_CLASSES:
            case Core::ATTR_CACHE:
            case Core::ATTR_CACHE_LIFESPAN:
            case Core::ATTR_CASCADE_SAVES:
            case Core::ATTR_CASE:
            case Core::ATTR_CLIENT_VERSION:
            case Core::ATTR_CMPNAME_FORMAT:
            case Core::ATTR_COLL_KEY:
            case Core::ATTR_COLL_LIMIT:
            case Core::ATTR_COLLECTION_CLASS:
            case Core::ATTR_CONNECTION_STATUS:
            case Core::ATTR_CREATE_TABLES:
            case Core::ATTR_CURSOR:
            case Core::ATTR_CURSOR_NAME:
            case Core::ATTR_DBNAME_FORMAT:
            case Core::ATTR_DECIMAL_PLACES:
            case Core::ATTR_DEF_TABLESPACE:
            case Core::ATTR_DEF_TEXT_LENGTH:
            case Core::ATTR_DEF_VARCHAR_LENGTH:
            case Core::ATTR_DEFAULT_COLUMN_OPTIONS:
            case Core::ATTR_DEFAULT_IDENTIFIER_OPTIONS:
            case Core::ATTR_DEFAULT_PARAM_NAMESPACE:
            case Core::ATTR_DEFAULT_SEQUENCE:
            case Core::ATTR_DEFAULT_TABLE_CHARSET:
            case Core::ATTR_DEFAULT_TABLE_COLLATE:
            case Core::ATTR_DEFAULT_TABLE_TYPE:
            case Core::ATTR_DRIVER_NAME:
            case Core::ATTR_EMULATE_DATABASE:
            case Core::ATTR_ERRMODE:
            case Core::ATTR_EXPORT:
            case Core::ATTR_FETCH_CATALOG_NAMES:
            case Core::ATTR_FETCH_TABLE_NAMES:
            case Core::ATTR_FETCHMODE:
            case Core::ATTR_FIELD_CASE:
            case Core::ATTR_FKNAME_FORMAT:
            case Core::ATTR_HYDRATE_OVERWRITE:
            case Core::ATTR_IDXNAME_FORMAT:
            case Core::ATTR_LISTENER:
            case Core::ATTR_LOAD_REFERENCES:
            case Core::ATTR_MAX_COLUMN_LEN:
            case Core::ATTR_MAX_IDENTIFIER_LENGTH:
            case Core::ATTR_MODEL_CLASS_PREFIX:
            case Core::ATTR_MODEL_LOADING:
            case Core::ATTR_NAME_PREFIX:
            case Core::ATTR_ORACLE_NULLS:
            case Core::ATTR_PERSISTENT:
            case Core::ATTR_PORTABILITY:
            case Core::ATTR_PREFETCH:
            case Core::ATTR_QUERY_CACHE:
            case Core::ATTR_QUERY_CACHE_LIFESPAN:
            case Core::ATTR_QUERY_CLASS:
            case Core::ATTR_QUERY_LIMIT:
            case Core::ATTR_QUOTE_IDENTIFIER:
            case Core::ATTR_RECORD_LISTENER:
            case Core::ATTR_RECURSIVE_MERGE_FIXTURES:
            case Core::ATTR_RESULT_CACHE:
            case Core::ATTR_RESULT_CACHE_LIFESPAN:
            case Core::ATTR_SEQCOL_NAME:
            case Core::ATTR_SEQNAME_FORMAT:
            case Core::ATTR_SERVER_INFO:
            case Core::ATTR_SERVER_VERSION:
            case Core::ATTR_STATEMENT_CLASS:
            case Core::ATTR_STRINGIFY_FETCHES:
            case Core::ATTR_TABLE_CLASS:
            case Core::ATTR_TABLE_CLASS_FORMAT:
            case Core::ATTR_TBLCLASS_FORMAT:
            case Core::ATTR_TBLNAME_FORMAT:
            case Core::ATTR_THROW_EXCEPTIONS:
            case Core::ATTR_TIMEOUT:
            case Core::ATTR_USE_DQL_CALLBACKS:
            case Core::ATTR_USE_NATIVE_ENUM:
            case Core::ATTR_USE_NATIVE_SET:
            case Core::ATTR_VALIDATE:
                $this->attributes[$attribute] = $value;
                break;

            default:
                throw new Exception("Invalid attribute '{$attribute}'! Must be one of Core::ATTR_* constants.");
        }
    }
702755
public void setAttribute(final String attributeName, final String attributeValue) {
        uiObject.getElement().setAttribute(attributeName, attributeValue);
    }
372355
protected function setInternalValuesData(AttributeInterface $attribute, $dataValues, array $context = null)
    {
        $this->checkAttribute($attribute);
        $dataValues = $this->ensureNativeArray($dataValues, $this->getFamilyCode().'.'.$attribute->getCode());
        $values = new ArrayCollection();
        $position = 0; // Reset position to zero

        foreach ($this->getInternalValues($attribute, $context) as $value) {
            // If there values to replace
            if (\count($dataValues)) {
                // Extract new values and replaces them one by one
                $dataValue = array_shift($dataValues);
                $value->setPosition(++$position);
                $this->setInternalValueData($attribute, $value, $dataValue);
                $values->add($value);
            } else {
                // If there are too much existing values previously, remove the extra ones
                $this->removeValue($value);
            }
        }

        // If there are still values to add
        foreach ($dataValues as $dataValue) {
            $value = $this->createValue($attribute, $context);
            $value->setPosition(++$position);
            $this->setInternalValueData($attribute, $value, $dataValue);
            $values->add($value);
        }

        return $values;
    }