performs an 'insert ignore' query with the data
@param  array  $attributes
@return bool   t/f for success/failure
336285
public static function insertIgnore(array $attributes = [])
    {
        $model = new static();
        $driver = $model->GetConnection()->GetDriverName();
        switch ($driver) {
            case 'sqlite':
                return static::executeQuery('insert or ignore', $attributes);
                break;
            default:
                return static::executeQuery('insert ignore', $attributes);
                break;
        }
    }
666635
public function update(array $attributes)
    {
        return $this->validate($attributes) ? (boolean) Language::where('id', $attributes['id'])->update($attributes) : false;
    }
962287
public function updateSql(array $attributes)
    {
        $attrs = [];
        foreach ($attributes as $key => $value) {
            $attrs[$this->getModel()->convertToPrimaryKeyName($key)] = $value;
        }

        $sql = $this
            ->getQueryBuilder()
            ->update()
            ->table($this->getModel()->tableName())
            ->values($attrs)
            ->toSQL();

        return $sql;
    }
329796
public function create($attributes = array())
    {
        $entity = $this->build($attributes);

        // to SQL.
        $criteria = $this->criteria();
        $sql = $criteria->toInsertSQL($attributes);

        // query.
        $sth = $this->query($sql, $criteria->getParams(), Database::TARGET_MASTER);
        if ($sth->isSuccess()) {
            $entity->exists = true;
            $entity->setPrimaryValue($sth->lastInsertId());
            return $entity;
        }
    }
449297
public function setAttributes(array $attributes = [])
    {
        $this->attributes = array_merge($this->attributes, $attributes);
        isset($attributes['id']) ? $this->id         = $attributes['id'] : null;
        return $this;
    }
1018284
public function create($attributes = array())
    {
        $entity = $this->build($attributes);
        $cond = $this->condition();

        // to SQL.
        $sql = $cond->toInsertSQL($attributes);
        var_dump($sql, $cond->getParams());

        // query.
        $sth = $this->query($sql, $cond->getParams());
        if ( $sth->isSuccess() ) {
            $entity->exists = true;
            $entity->setPrimaryValue($sth->lastInsertId());
            return $entity;
        }
    }
307958
public function replicate(array $attributes = [])
    {
        $copy = new static(array_merge($this->toArray(), $attributes));
        $copy->setConstraints(clone $this->getConstraints());
        return $copy;
    }
74884
protected function setUnfillableAttributes(array $attributes = [])
    {
        if ( ! empty( $attributes )) {
            $keysToFill = array_diff(array_keys($attributes), $this->fillable);
            foreach ($keysToFill as $key) {
                $this->setAttribute($key, $attributes[$key]);
            }
        }
    }
1055805
public function dontSeeElementInDOM($selector, $attributes = [])
    {
        $els = $this->match($this->getBaseElement(), $selector);
        $els = $this->filterByAttributes($els, $attributes);
        $this->assertEmpty($els);
    }
473681
public function addHidden($attributes = null)
    {
        $this->hidden = array_merge(
            $this->hidden, is_array($attributes) ? $attributes : func_get_args()
        );
    }
602927
public function setAllowedAttributes($attributes)
        {
            if(!is_array($attributes)) {
                $attributes = [$attributes];
            }
            $this->allowedAttributes = $attributes;
            return $this;
        }
48166
public function fail($attributes)
    {
        foreach ($this->locked as $idx => $job) {
            if ($job['id'] == $attributes['id']) {
                unset($this->locked[$idx]);
                break;
            }
        }

        $attributes['status'] = 'failed';
        $this->failed[] = $attributes;
    }
999328
public function validate(array $attributes): bool
    {
        $rules = $this->getScenarios();

        foreach ($rules as $rule) {
            $names = array_map('trim', explode(',', $rule[0]));
            array_walk($names, function ($name) use ($attributes, $rule) {
                $this->validateValue($attributes, $name, $rule);
            });
            unset($names);
        }

        unset($rules);

        return count($this->errors) === 0;
    }
807106
public function replaceAttributes(array $attributes)
    {
        $url = self::makeAttributeUrl();
        $data = json_encode(array("attribute" => $attributes));

        $replaced = $this->service->prepAndSend($url, array(200), 'PUT', $data, true);
        $replaced = json_decode($replaced);
        $result = array();
        foreach ($replaced->attribute as $attr) {
            $result[] = Attribute::createFromJSON($attr);
        }
        return $result;
    }
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;
  }
1308632
public function forceFill( array $attributes )
	{
		// Since some versions of PHP have a bug that prevents it from properly
		// binding the late static context in a closure, we will first store
		// the model in a variable, which we will then use in the closure.
		$model = $this;

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

        return $this;
    }