Performs the Commit action with the Flow Adapter

@param array $attributes
@return array
9801
protected function performCommit(array $attributes)
    {
        return $this->flow->send(
            'post',
            $this->endpoint . '/' . ($options['method'] ?? $this->verbsMap['commit'] ?? 'create'),
            $attributes
        );
    }
768151
public function fill(array $attributes = [])
    {
        foreach ($attributes as $property => $value) {
            if (isset(static::$propertyMap[static::class][$property])) {
                $this->{$property} = $value;
                continue;
            }

            if (isset(static::$setterMap[static::class][$property])) {
                $this->__set($property, $value);
                continue;
            }

            if (!isset(static::$aliases[static::class][$property])) {
                $this->constraints->__set($property, $value);
                continue;
            }

            $alias = static::$aliases[static::class][$property];

            if ($alias instanceof Closure) {
                $alias($this, $property, $value);
                continue;
            }

            if (property_exists($this, $alias)) {
                $this->{$alias} = $value;
                continue;
            }

            // Because constraints needs to be removed on
            // false values, they can only be aliased with
            // closures (callables) so this line is only
            // included to document that
            // $this->__set($alias, $value);
        }

        return $this;
    }
158384
public function make(array $attributes = [])
    {
        /** @var Identifiable $model */
        $model = $this->performMake($attributes);
        $this->fill($model, $attributes);
        $this->callAfterListeners('make', [$model]);

        return $model;
    }
700110
public function create($attributes = [])
    {
        // Attributes have to be array
        if (!(isset($attributes)) || !is_array($attributes)) {
            throw new \InvalidArgumentException('Undefined attributes', 400);
        }

        // Perform before hook
        $attributes = $this->beforeCreate($attributes);

        // Remove non fillable attributes
        $fields = array_intersect_key($attributes, array_flip($this->fillable));

        // Validate attributes
        $this->setValidationRules();
        $errors = $this->validationErrors($fields);
        if ($errors) {
            throw new Exceptions\ValidationException('Invalid attributes', 400, $errors);
        }

        // Create the model and return its ID
        $result = $this->db()->table($this->table)->insertGetId($fields);

        // Return false if create fails
        if (!$result) {
            throw new \Exception('Could not create the model', 500);
        }

        // Sync many to many relationships
        $this->sync($result, $attributes);

        // Upsert has many relationships
        $this->updateHasMany($result, $attributes);

        // Get the created model
        $model = $this->find($result);

        // Run after hook
        $model = $this->afterCreate($result, $attributes, $model);

        // Return the created model
        return $model;
    }
417360
protected function addDateAttributesToArray(array $attributes)
    {
        foreach ($this->getDates() as $key) {
            if (! isset($attributes[$key])) {
                continue;
            }

            $attributes[$key] = $this->serializeDate(
                $this->asDateTime($attributes[$key])
            );
        }

        return $attributes;
    }
800405
protected function hashPasswordAttributes(array $attributes = array(), array $passwordAttributes = array()) {

        if (empty($passwordAttributes) || empty($attributes)) {
            return $attributes;
        }

        $result = array();
        foreach ($attributes as $key => $value) {

            if (in_array($key, $passwordAttributes) && !is_null($value)) {
                if ($value != $this->getOriginal($key)) {
                    $result[$key] = Hash::make($value);
                }
            } else {
                $result[$key] = $value;
            }
        }

        return $result;
    }
1318864
public function save($attributes = [])
    {
        $attributes = (empty($attributes) || is_null($attributes)) ? $this->getAttributes() : $attributes;

        return $this->_save($attributes);
    }
57893
protected function applyDefaultAttrValues(array $attributes = [])
    {
        $attributes = parent::applyDefaultAttrValues($attributes);

        // Set defaults for the entire entity.
        foreach ($this->getMetadata()->defaultValues as $key => $value) {
            if (isset($attributes[$key])) {
                continue;
            }
            $attributes[$key] = $this->convertAttributeValue($key, $value);
        }
        return $attributes;
    }
845151
public function fill( array $attributes ) {
		foreach ( $attributes as $key => $value ) {
			if ( ! array_key_exists( $key, $this->attributes ) ) {
				continue;
			}

			$this->set_attribute( $key, $value );
		}

		return $this;
	}
87380
public function create(array $attributes = [])
    {
        $results = $this->make($attributes);

        if ($results instanceof Model) {
            $results->save();
        } else {
            $results->each->save();
        }

        return $results;
    }
6947
protected function callClosureAttributes(array $attributes)
    {
        foreach ($attributes as &$attribute) {
            $attribute = $attribute instanceof Closure
                ? $attribute($attributes) : $attribute;
        }

        return $attributes;
    }
542379
final public function sort(array $attributes = array())
    {
        $category       = $this->find($attributes['movingId']);
        $positionEntity = $this->find($attributes['movedId']);

        if ($category instanceof Category) {
            if ($this->fireEvent('sorting', array($category)) === false) {
                return false;
            }

            $category->setCaller($this);
            $category->{$attributes['type']}($positionEntity);

            $this->fireEvent('sorted', array($category));

            return $category;
        }

        throw new Exception(sprintf(Exception::CANT_UPDATE_MODEL,
            'Subbly\\Model\\Category',
            $this->name()
        ));
    }
20688
public function map(array $attributes)
    {
        foreach ($attributes as $key => $value) {
            $this->{$key} = $value;
        }

        return $this;
    }
1294069
protected function mergeAttributes(array $attributes)
    {
        foreach ($this->merged as $resource) {
            $attributes = array_replace_recursive($attributes, $resource->getAttributes());
        }

        return $attributes;
    }
1155238
protected function convertNamesToLdap(array $attributes)
    {
        return !$this->schema ? $attributes : (new AttributeNameResolver($this->schema))->toLdap($attributes);
    }
576995
final public function overwriteAttributes($attributes)
    {
        foreach($attributes as $key => $attribute)
        {
            if (isset($this->{$key}))
            {
                $this->{$key} = $attribute;
            }
        }

        return $attributes;
    }
1148070
protected function mergeDefaultAttributes(array $attributes)
    {
        if ($this->schema && !empty($this->schema->getDefaultValues())) {
            $attributes = array_merge($this->schema->getDefaultValues(), $attributes);
        }

        return $attributes;
    }