Set attribute

@return \Ark\Database\Model
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;
    }
628666
public function setAttribute(\Sulu\Bundle\ProductBundle\Entity\Attribute $attribute)
    {
        $this->attribute = $attribute;

        return $this;
    }
1352513
public function setAttributes(array $attributes)
    {
        $this->attributes = [];
        foreach ($attributes as $attribute => $value) {
            $this->addAttribute($attribute, $value);
        }

        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.'".');
        }
    }
89675
protected function setAttributes ()
	{
		$file 					= $this->file;	
		$this->fileName 		= $file['name'];
		$this->mimeType 	 	= $file['type'];
		$this->tempPath 		= $file['tmp_name'];
		$this->fileError 		= $file['error'];
		$this->fileSize 		= $file['size'];

		$pathParts 				= pathinfo($this->fileName);
		$this->fileExtension  	= isset($pathParts['extension']) ? ".".strtolower($pathParts['extension']) : "";
		$newUniqueName 			= uniqid("", TRUE).$this->fileExtension;
		$this->newFileName 		= Validate::hasValue($this->newFileName) ? $this->newFileName.$this->fileExtension : $newUniqueName;
	}
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;
	}
929741
public function updateModels(iterable $attributes): self
    {
        $this->update($this->quoteSingleIdentifier($this->getTableName()));

        foreach ($this->bindAttributes($this->getModelClass(), $attributes) as $quotedColumn => $parameterName) {
            $this->set($quotedColumn, $parameterName);
        }

        return $this;
    }
587297
public function setAttributeAvId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->attribute_av_id !== $v) {
            $this->attribute_av_id = $v;
            $this->modifiedColumns[AttributeTypeAvMetaTableMap::ATTRIBUTE_AV_ID] = true;
        }

        if ($this->aAttributeAv !== null && $this->aAttributeAv->getId() !== $v) {
            $this->aAttributeAv = null;
        }


        return $this;
    }
1133756
public function setAttributes($attributes)
    {
        foreach ($attributes as $attribute => $value) {
            if ($attribute === 'class') {
                $this->addClass($value);
                continue;
            }

            if (is_int($attribute)) {
                $attribute = $value;
                $value = '';
            }

            $this->setAttribute($attribute, (string) $value);
        }

        return $this;
    }
1324899
public function setAttr($attribute, $value = null)
    {
        if (is_array($attribute) && is_null($value)) {
            foreach ($attribute as $k => $v) {
                $this->setAttr($k, $v);
            }

            return $this;
        }
        $this->template->appendHTML('attributes', ' '.$attribute.'="'.$value.'"');

        return $this;
    }
589482
public function set_attribute($key, $value)
	{
		$attributes = $this->get_config('form_attributes', array());
		$attributes[$key] = $value;
		$this->set_config('form_attributes', $attributes);

		return $this;
	}
449297
public function setAttributes(array $attributes = [])
    {
        $this->attributes = array_merge($this->attributes, $attributes);
        isset($attributes['id']) ? $this->id         = $attributes['id'] : null;
        return $this;
    }
983164
public function setAttributes(array $attributes, $clear = false)
    {
        if ($clear) {
            $this->attributes = [];
        }

        foreach ($attributes as $key => $value) {
            $this->addAttribute($key, $value);
        }

        return $this;
    }
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;
    }
1064227
public function setAttribute($name)
    {
        if (!$this->isValidAttribute($name)) {
            throw new exception\InvalidArgumentException(sprintf(
                'Invalid attribute name "%s"', $name
            ));
        }

        $this->attribute = $name;
        return $this;
    }
65982
public function setAttributes(array $attributes = [])
    {
        $this->attributes = array_merge($this->attributes, $attributes);

        $this->validateAttributes();

        $this->decoupleOptionsFromAttributes();

        return $this;
    }
1166243
public function setAttributes($attributes)
    {
        if ($attributes === null) {
            $this->attributes = [];

            return $this;
        }

        if (is_array($attributes)) {
            $this->attributes = $attributes;

            return $this;
        }

        $attributes = explode(',', $attributes);
        $attributes = $this->relationsToArray($attributes);

        $this->attributes = $attributes;

        return $this;
    }