Setter for the dimensions format.

@param  string $dimensions

@return $this
969583
public function format($dimensions)
    {
        if (is_array($dimensions)) {
            $this->dimensions = $dimensions;
        }

        if (is_string($dimensions)) {
            $this->dimensions = explode('.', $dimensions);
        }

        return $this;
    }
270976
public function mergeDimensions($newDimensions)
    {
        $newDimensions = $this->convertToArrayIfString($newDimensions);

        $this->dimensions = $this->mergeNewDimensionsToCurrentOnes($newDimensions);
    }
773945
protected function getDimensionsToSelect($dimensions, $additionalSelects)
    {
        if (empty($additionalSelects)) {
            return $dimensions;
        }

        $dimensionsToSelect = array();
        foreach ($dimensions as $selectAs => $dimension) {
            $asAlias = $this->getSelectAliasAs($dimension);
            foreach ($additionalSelects as $additionalSelect) {
                if (strpos($additionalSelect, $asAlias) === false) {
                    $dimensionsToSelect[$selectAs] = $dimension;
                }
            }
        }

        $dimensionsToSelect = array_unique($dimensionsToSelect);
        return $dimensionsToSelect;
    }
559443
public function setColumnWidths(array $widths)
    {
        $this->columnWidths = [];
        foreach ($widths as $index => $width) {
            $this->setColumnWidth($index, $width);
        }

        return $this;
    }
1278581
public function dimension($width, $height = 0): self
    {
        if (empty($height)) {
            $height = $width;
        }

        return $this->set('dimension', compact('width', 'height'));
    }
14908
public static function initialize(Dimension $dimension, Number $value): self
    {
        $rows = [];
        $count = $dimension->rows()->value();

        for ($i = 0; $i < $count; ++$i) {
            $rows[] = new RowVector(
                ...array_fill(
                    0,
                    $dimension->columns()->value(),
                    $value
                )
            );
        }

        return new self(...$rows);
    }
473051
protected function getNodeInDimensions(array $dimensions, array $targetDimensions)
    {
        $q = new FlowQuery([$this->currentNode]);

        return $q->context([
            'dimensions' => $dimensions,
            'targetDimensions' => $targetDimensions
        ])->get(0);
    }
1320587
public function setDecimals(string $decimals)
    {
        if (empty($decimals)) {
            Throw new PasswordException('Decimals cannot be an empty string.');
        }

        $this->decimals = $decimals;
    }
570761
public function setConstraints($constraints)
    {
        foreach ($constraints as $fieldName => $v) {
            if (is_array($v)) {
                foreach ($v as $constraintFromArray) {
                    $this->setConstraint($fieldName, $constraintFromArray);
                }
            } else {
                $this->setConstraint($fieldName, $v);
            }
        }

        return $this;
    }
773759
public ResponseResourceMetricKey withDimensions(java.util.Map<String, String> dimensions) {
        setDimensions(dimensions);
        return this;
    }
1283642
public function setSize($width, $height)
    {
        $this->width = $width;
        $this->height = $height;

        return $this;
    }
1371505
public function setSize($size)
    {
        if (is_string($size) && $parsed = $this->parseSizeWord($size)) {
            $this->size = $parsed;
        } else {
            $this->size = $size;
        }
        return $this;
    }
609885
public function setSize($size = 32)
    {
        $size = (int)$size;

        // Gravatars can be sized 1px up to 2048px square: https://en.gravatar.com/site/implement/images/#size
        if ($size < 1) {
            $size = 1;
        }

        if ($size > 2048) {
            $size = 2048;
        }

        $this->size = $size;

        return $this;
    }
595542
public function setPageSizes(array $pageSizes)
    {
        $this->pageSizes = $pageSizes;

        // Reset items per page
        $this->setItemsPerPage(current($pageSizes));

        return $this;
    }
501431
public function setSize($size)
    {
        if (!empty($size)) {
            $this->size = $size;
            $this->pxRatio = round($size / 5);

            return $this;
        }
    }
775851
public function createDimensions($url, $dimensions = array())
    {
        // Get default dimensions
        $defaultDimensions = Config::get('redminportal::image.dimensions');
     
        if (is_array($defaultDimensions)) {
            $dimensions = array_merge($defaultDimensions, $dimensions);
        }
     
        foreach ($dimensions as $dimension) {
            // Get dimmensions and quality
            $width   = (int) $dimension[0];
            $height  = isset($dimension[1]) ?  (int) $dimension[1] : $width;
            $crop    = isset($dimension[2]) ? (bool) $dimension[2] : false;
            $quality = isset($dimension[3]) ?  (int) $dimension[3] : Config::get('redminportal::image.quality');
     
            // Run resizer
            $this->resize($url, $width, $height, $crop, $quality);
        }
    }
1245108
public function setNumSpaces(int $numSpaces): self
    {
        $this->spaces = \str_repeat(' ', $numSpaces);
        $this->numSpaces = $numSpaces;

        return $this;
    }