This method may be overridden to actually set the attribues.

@return void
776926
protected static function initAttributeSet()
    {
        $className = get_called_class();
        
        if (!ModelAttributes::attributesSetFor($className)) {
            ModelAttributes::setClassAttributes(
                $className,
                static::attributeSet()
            );
        }
    }
669831
public function mapRulesToAttributes()
    {
        foreach ($this->rules as $rule) {
            $params = explode(':', $rule);

            $this->attributes[reset($params)] = end($params);
        }
    }
840895
public function setAttributes($attributes)
    {
        foreach ($attributes as $k => $val) {
            if ($this->isIgnoredAttribute($k)) {
                continue;
            }

            // this is for adding new class name with
            //   +=newClass
            if( is_string($val) && strpos($val ,'+=') !== false ) {

                
                $origValue = $this->getAttributeValue($k);
                if( is_string($origValue) ) {
                    $origValue .= ' ' . substr($val,2);
                } elseif ( is_array($origValue) ) {
                    $origValue[] = substr($val,2);
                } elseif ( is_object($origValue) ) {
                    throw new Exception('Invalid Object for attribute: ' . get_class($origValue) );
                } else {
                    throw new Exception('Unknown attribute value type.');
                }
                $this->setAttributeValue($k,$origValue);
            } else {
                $this->setAttributeValue($k, $val);
            }
        }
    }
720627
public function setAttrArray(array $attributes)
    {
        foreach ($attributes as $attribute => $value) {
            $this->setAttr($attribute, $value);
        }
    }
805874
def set_attrs(self):
        
        self.attrs.encoding = self.encoding
        self.attrs.errors = self.errors
385896
private function setFailure() : void
    {
        $this->session->set('failure',      $this->session->get('failure') + 1);
        $this->session->set('failure_time', time() + (int) static::FAILURE_TIME);
    }
689514
protected function setSort()
    {
        $this->sort = Input::get($this->sortName, []);
        if (!is_array($this->sort)) {
            return;
        }

        if (empty($this->sort['column']) || empty($this->sort['type'])) {
            return;
        }

        if (Str::contains($this->sort['column'], '.')) {
            $this->setRelationSort($this->sort['column']);
        } else {
            $this->resetOrderBy();

            // get column. if contains "cast", set set column as cast
            if (!empty($this->sort['cast'])) {
                $column = "CAST({$this->sort['column']} AS {$this->sort['cast']}) {$this->sort['type']}";
                $method = 'orderByRaw';
                $arguments = [$column];
            } else {
                $column = $this->sort['column'];
                $method = 'orderBy';
                $arguments = [$column, $this->sort['type']];
            }

            $this->queries->push([
                'method'    => $method,
                'arguments' => $arguments,
            ]);
        }
    }
1000818
public function setAttributeId( $id )
	{
		if ( $id == $this->getAttributeId() ) { return; }

		$this->_values['attrid'] = (string) $id;
		$this->setModified();
	}
547158
public function setAttributes()
    {
        $attributes = func_get_args();
        if (count($attributes)) {
            if (count($attributes) == 1 && is_array($attributes[0])) {
                $attributes = $attributes[0];
            }
            $this->attributes = $attributes;
        }

        return $this;
    }
278887
private function _setAttributes()
    {
        if (isset($this->_tokenData['sub'])) {
            $user_data = $this->_tokenData;

            // Remove the values that are part of the JWT and not user attributes.
            unset($user_data['sub']);
            unset($user_data['exp']);
            unset($user_data['nbf']);
            unset($user_data['aud']);
            unset($user_data['iss']);
            unset($user_data['jti']);
            unset($user_data['iat']);

            $this->attributes = $user_data;
            if (array_key_exists('eduPersonEntitlement', $this->attributes)) {
                if (is_array($this->attributes['eduPersonEntitlement'])) {
                    $this->entitlements = $this->attributes['eduPersonEntitlement'];
                } else {
                    $this->entitlements = [$this->attributes['eduPersonEntitlement']];
                }
            } else {
                $this->entitlements = [];
            }
        } else {
            throw new \Exception("No principal found!", 400);
        }
    }
1133102
public function set()
    {
        if (!$this->cookiesSet) {
            foreach ($this->jar as $c)
                $c->set();
            $this->cookiesSet = true;
        }
    }
240074
public function setToDeleted()
    {
        if ($this->isLoaded()) {
            $this->data['deleted'] = true;
            $this->markAsDirty();
        } else {
            $this->markAsDead();
        }
    }
607305
public function setAttrs($attrs)
    {
        $oldAttrs = $this->attributes;
        $oldClasses = $this->classes;

        $this->attributes = $attrs;
        $this->attributes = Generator::parseAtts($this);

        $this->attributes = array_merge($oldAttrs, $this->attributes);
        $this->classes = null;
        $this->update('classes');

        if (!empty($oldClasses) && !empty($this->classes)) {
            $this->attributes['class'] = implode(' ', array_merge($oldClasses, $this->classes));
        }
        $this->classes = null;

        if (!empty($oldAttrs['style']) && !empty($this->attributes['style'])) {
            $this->attributes['style'] = Generator::mergeStyles($this->attributes['style'], $oldAttrs['style']);
        }

        $this->update();
    }
590639
public function init(): void
    {
        parent::init();

        foreach (['useTablePrefix', 'showOnly', 'generalSchema', 'fixHistory'] as $property) {
            if ($this->$property !== true) {
                if ($this->$property === 'true' || $this->$property === 1) {
                    $this->$property = true;
                }

                $this->$property = (bool)$this->$property;
            }
        }
    }
603920
protected function initData()
    {
        if ($this->data !== null) {
            return;
        }

        if ($this->value !== null) {
            $this->data = $this->value;
            return;
        }

        if ($this->model instanceof Model) {
            $data = ($this->model->hasProperty($this->attribute) || isset($this->model->{$this->attribute}))
                ? ArrayHelper::getValue($this->model, $this->attribute, [])
                : [];

            if (!is_array($data) && empty($data)) {
                return;
            }

            if (!($data instanceof \Traversable)) {
                $data = (array) $data;
            }

            foreach ($data as $index => $value) {
                $this->data[$index] = $value;
            }
        }
    }
328441
public function set()
    {
        $args = func_get_args();

        if (count($args) == 2) {
            $this->attributes[$args[0]] = $args[1];
        } elseif (count($args) == 1 && is_array($args[0])) {
            $this->attributes = (array_merge($this->attributes, $args[0]));
        }

        return $this;
    }
424836
function () {
      var a$ = this._instanceAttributes;
      for (var k in a$) {
        if (!this.hasAttribute(k)) {
          this.setAttribute(k, a$[k]);
        }
      }
    }