Fill

@param array $settings []

@return GD
331069
public function fill(Array $settings = []) : GD
    {
        $x           = $settings['x']           ?? $this->x           ?? 0;
        $y           = $settings['y']           ?? $this->y           ?? 0;
        $color       = $settings['color']       ?? $this->color       ?? '0|0|0';
        $borderColor = $settings['borderColor'] ?? $this->borderColor ?? NULL;
        
        if( $borderColor === NULL )
        {
            imagefill($this->canvas, $x, $y, $this->allocate($color));
        }
        else
        {
            imagefilltoborder($this->canvas, $x, $y, $this->allocate($borderColor), $this->allocate($color));
        }

        $this->defaultRevolvingVariables();

        return $this;
    }
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;
    }
847489
public function update(array $settings)
    {
        foreach ($settings as $key => $value) {
            $this->getSettingOrFail($key);
        }

        $this->backend->setSettings($settings);
    }
1357947
public static function hydrateCollection(array $settings)
    {
        $hydrated = [];

        foreach ($settings as $setting) {
            $hydrated[] = self::hydrate($setting);
        }

        return $hydrated;
    }
961732
protected function buildInsertSet(
        /*# string */ $prefix,
        array $settings
    )/*# : string */ {
        if (empty($this->set_data)) {
            return '';
        }

        $cols = [];
        foreach (array_keys($this->set_col) as $col) {
            $cols[] = $this->quote($col, $settings);
        }
        return $settings['seperator'] . '(' . join(', ', $cols) . ')';
    }
247941
public function setSettings(array $settings): SettingsRepositoryInterface
    {
        $this->parseCompatibleSettings($settings);
        $this->settings = $settings;

        return $this;
    }
350400
public function columnMeta($settings)
    {
        foreach ($settings as $cName=>$cMeta) {
            if (isset($this->metaData["columns"]) && $this->metaData["columns"][$cName]) {
                $this->metaData["columns"][$cName] = array_merge(
                    $this->metaData["columns"][$cName],
                    $cMeta
                );
            }
        }
        return $this;
    }
1184359
public function rectangle(Array $settings = []) : GD
    {
        $x      = $settings['x']      ?? $this->x      ?? 0;
        $y      = $settings['y']      ?? $this->y      ?? 0;
        $width  = $settings['width']  ?? $this->width  ?? 100;
        $height = $settings['height'] ?? $this->height ?? 100;
        $color  = $settings['color']  ?? $this->color  ?? '0|0|0';
        $style  = $settings['type']   ?? $this->type   ?? NULL;

        $width  += $x;
        $height += $y;

        if( $style === NULL )
        {
            imagerectangle($this->canvas, $x, $y, $width, $height, $this->allocate($color));
        }
        else
        {
            imagefilledrectangle($this->canvas, $x, $y, $width, $height, $this->allocate($color));
        }

        $this->defaultRevolvingVariables();

        return $this;
    }
188891
public function crop(Array $settings = []) : GD
    {
        $sets = 
        [
            'x'      => $settings['x']      ?? $this->x      ?? 0,
            'y'      => $settings['y']      ?? $this->y      ?? 0,
            'width'  => $settings['width']  ?? $this->width  ?? 100,
            'height' => $settings['height'] ?? $this->height ?? 0,

        ];

        $this->canvas = imagecrop($this->canvas, $sets);

        $this->defaultRevolvingVariables();
        
        return $this;
    }
287550
public function setMapOptions(array $settings)
    {
        if (isset($settings['api_key'])) {
            $this->setApiKey($settings['api_key']);
        }

        if ($this->mapOptions) {
            $this->mapOptions = array_replace_recursive($this->mapOptions, $settings);
        } else {
            $this->mapOptions = array_replace_recursive($this->defaultMapOptions(), $settings);
        }

        return $this;
    }
1070478
public function setSettings( $settings )
    {
        if ( ! empty( $settings ) )
        {
            foreach ( $settings as $name => $value )
            {
                $this->setSetting( $name, $value );
            }
        }

        return $this;
    }
246662
public static function getInstance(array $settings = []): DIInterface
    {
        if (! self::$instance) {
            self::$instance = new DI($settings);
        }
        
        return self::$instance;
    }
674275
public function saveSettings($settings)
    {
        if (isset($settings['name']) && isset($this->config['servers'][$settings['name']])) {
            return $this->saveConfig(array_merge($this->config['servers'][$settings['name']], $settings));
        }
    }
808315
private function fill(array $attributes)
    {
        $name = array_filter(explode(' ', $attributes['name']));
        $name = array_shift($name);

        $bindValueName = $name;
        if (substr($name, -1) === '.') {
            $bindValueName = substr($bindValueName, 0, -1);
        }

        $attributes['value'] = $this->getValue($bindValueName, $attributes['value'] ?? null);

        $binding = explode('.', $name);

        $attributes['name'] = '';
        foreach ($binding as $key => $bind) {
            if (! is_null($attributes['prefix'])) {
                $attributes['name'] .= '['.$bind.']';
                continue;
            }

            if ($key === 0) {
                $attributes['name'] .= $bind;
                continue;
            }

            $attributes['name'] .= '['.$bind.']';
        }

        return $attributes;
    }
824666
public function fill(array $attributes = [])
    {
        $this->raw = $attributes;

        $excludes = config("api.excludes");

        foreach ($attributes as $key => $attribute) {
            // Guarded attributes should be removed
            if (in_array($key, $excludes)) {
                unset($attributes[$key]);
            }
            else if (method_exists($this, $key) && ((is_array($attribute) || is_null($attribute)))) {
                // Its a relation
                $this->relationAttributes[$key] = $attribute;

                // For belongs to relation, while filling, we need to set relation key.
                $relation = call_user_func([$this, $key]);

                if ($relation instanceof BelongsTo) {
                    $primaryKey = $relation->getRelated()->getKeyName();

                    if ($attribute !== null) {
                        // If key value is not set in request, we create new object
                        if (!isset($attribute[$primaryKey])) {
                            throw new RelatedResourceNotFoundException('Resource for relation "' . $key . '" not found');
                        }
                        else {
                            $model = $relation->getRelated()->find($attribute[$primaryKey]);

                            if (!$model) {
                                // Resource not found
                                throw new ResourceNotFoundException();
                            }
                        }
                    }

                    $relationKey = $relation->getForeignKey();

                    $this->setAttribute($relationKey, ($attribute === null) ? null : $model->getKey());
                }

                unset($attributes[$key]);
            }
        }

        return parent::fill($attributes);
    }
12744
public function fillByArray(array $types)
    {
        foreach ($types as $mimeType => $extensions) {
            $this->extensionsByType[$mimeType] = $extensions;
            foreach ($extensions as $extension) {
                $this->typeByExtension[$extension] = $mimeType;
            }
        }

        return $this;
    }
1165599
public function mergeSelectizeOptions(array $settings)
    {
        $this->selectizeOptions = array_merge(
            $this->selectizeOptions,
            $this->parseSelectizeOptions($settings)
        );

        return $this;
    }