Determine if the model or given attribute(s) have been modified.

@param array|string|null $attributes

@return bool
11404
public function isDirty($attributes = null): bool
    {
        $attributes = is_array($attributes) ? $attributes : func_get_args();

        if (parent::isDirty($attributes)) {
            return true;
        }

        foreach ($this->translationCache as $translation) {
            if ($translation->isDirty($attributes)) {
                return true;
            }
        }

        return false;
    }
660025
protected function replaceAttributes(array $attributes)
    {
        foreach ($this->abbreviations as $abbreviation => $attribute) {
            if (isset($attributes[$abbreviation])) {
                $attributes[$attribute] = $attributes[$abbreviation];
                unset($attributes[$abbreviation]);
            }
        }

        return $attributes;
    }
580098
public function isDirty($attributes = null)
	{
		$dirty = $this->getDirty();

		if (is_null($attributes)) return count($dirty) > 0;

		if ( ! is_array($attributes)) $attributes = func_get_args();

		foreach ($attributes as $attribute)
		{
			if (array_key_exists($attribute, $dirty)) return true;
		}

		return false;
	}
120575
public function has_mapping( $attributes = null ) {
		$mapping = $this->get_mapping();

		if ( is_null( $attributes ) ) {
			return count( $mapping ) > 0;
		}

		$attributes = is_array( $attributes ) ? $attributes : func_get_args();
		foreach ( $attributes as $attribute ) {
			if ( array_key_exists( $attribute, $mapping ) ) {
				return true;
			}
		}

		return false;
	}
637370
final public function hasAttribute (string $attribute) : bool
	{
		$objectAttributes = $this->attributes();
		return array_key_exists($attribute, $objectAttributes);
	}
781140
public function update(array $attributes)
    {
        if ($this->related->usesTimestamps()) {
            $attributes[$this->relatedUpdatedAt()] = $this->related->freshTimestamp();
        }

        return $this->query->update($attributes);
    }
672880
public function haveAllRequiredAttributes( array $attributes ) : bool
   {

      foreach ( $this->_attributes as $attribute )
      {
         if ( ! $attribute->isRequired() )
         {
            continue;
         }
         if ( ! isset( $attributes[ $attribute->getName() ] ) )
         {
            if ( $attribute->hasValueMissedLink() && $attribute->getValueMissedLink()->isValid() )
            {
               continue;
            }
            return false;
         }
      }

      return true;

   }
319682
public function isModified($property = null)
    {
        $result = false;

        if($property)
        {
            if (isset($this->_modified[$property]) && $this->_modified[$property]) {
                $result = true;
            }
        }
        else $result = (bool) count($this->_modified);

        return $result;
    }
596045
protected function allFailingRequired(array $attributes)
    {
        foreach ($attributes as $key) {
            if ($this->validateRequired($key, $this->getValue($key))) {
                return false;
            }
        }

        return true;
    }
1146964
private function mapAttributeValues(array $attributes, Attribute $attribute)
    {
        $key = $attribute->getName();
        $value = $attribute->getAllAttributeValues();

        if (!array_key_exists($key, $attributes) && 1 === count($value)) {
            $value = array_shift($value);
        }

        if (array_key_exists($key, $attributes)) {
            $currentValue = (is_array($attributes[$key]) ? $attributes[$key] : [$attributes[$key]]);

            $value = array_merge($currentValue, $value);
        }

        $attributes[$key] = $value;

        return $attributes;
    }
1013608
public function update($attributes)
    {
        $this->attributes = array_merge($this->attributes, array_filter($attributes, function ($attribute) {
            return ! is_null($attribute);
        }));

        return $this;
    }
1238174
private function autoAssign($attributes = null)
  {
    if (!is_array($attributes)) return false;

    $this->max     = isset($attributes[0]) ? $attributes[0] : $this->max;
    $this->minutes = isset($attributes[1]) ? $attributes[1] : 1;
    $this->decay   = isset($attributes[1]) ? strtotime($attributes[1] . ' minutes', 0) : $this->decay;

    return true;
  }
779555
public function setAttributes(array $attributes = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$attributes', $attributes, __NAMESPACE__ . '\Pair');

        $this->attributes = $attributes;

        return $this;
    }
1352132
protected function saveQuery(array $attributes = null): Query
    {
        return Query::update(static::$tableName)
            ->set($attributes ?? $this->getFieldsValues())
            ->where($this->getPKValue())
        ;
    }
260399
public function update(array $attributes = array())
    {
        if (! $this->exists) {
            return $this->newQuery()->update($attributes);
        }

        return $this->fill($attributes)->save();
    }
294079
public function update( array $attributes = [], array $options = [] )
    {
        if( ! $this->exists ) {
            return false;
        }
        $updated = $this->fill( $attributes )->save( $options );
        self::$lastUpdated = $this;
        return $updated;
    }
160453
protected function attributes($attributes = [])
    {
        $ar = [];

        foreach ($attributes as $key => $value) {
            $element = $this->attribute($key, $value);
            if (!is_null($element)) {
                $ar[] = $element;
            }
        }

        return count($ar) > 0 ? ' '.implode(' ', $ar) : '';
    }