Gets the paper size

@param null|string|array $paperSize
@return int[] A four-element integer array
188716
public function getPaperSize($paperSize = null)
    {
        $size = $paperSize !== null ? $paperSize : $this->paperSize;
        if (is_array($size)) {
            return $size;
        } else if (isset(Adapter\CPDF::$PAPER_SIZES[mb_strtolower($size)])) {
            return Adapter\CPDF::$PAPER_SIZES[mb_strtolower($size)];
        } else {
            return Adapter\CPDF::$PAPER_SIZES["letter"];
        }
    }
701105
public function getSize()
    {
        return $this->oxarticles__oxlength->value *
                 $this->oxarticles__oxwidth->value *
                 $this->oxarticles__oxheight->value;
    }
161858
public function getTableCellSize()
    {
        if ($this->column_size===0 && $this->line_size===0 && $this->cell_size===0) {
            $this->_parseTableSizes();
        }
        return $this->cell_size;
    }
126947
public function getMapSizeMarker($size)
    {
        $b = '';

        if ($size < Constants::SIZE_TINY) {
            $b .= chr(Constants::MAP_TINY + $size);

            return $b;
        }

        if ($size < Constants::SIZE_8) {
            $b .= chr(Constants::MAP_8);
            $b .= $this->packUnsignedShortShort($size);

            return $b;
        }

        if ($size < Constants::SIZE_16) {
            $b .= chr(Constants::MAP_16);
            $b .= $this->packUnsignedShort($size);

            return $b;
        }

        if ($size < Constants::SIZE_32) {
            $b .= chr(Constants::MAP_32);
            $b .= $this->packUnsignedLong($size);

            return $b;
        }

        throw new SerializationException(sprintf('Unable to pack Array with size %d. Out of bound !', $size));
    }
1248512
public function FilteredUpdates($pageSize = 20)
    {
        $params = $this->parseParams();

        $items = $this->Updates(
            $params['tag'],
            $params['from'],
            $params['to'],
            $params['year'],
            $params['month']
        );

        // Apply pagination
        $list = PaginatedList::create($items, $this->getRequest());
        $list->setPageLength($pageSize);
        return $list;
    }
845943
public function getColumns($size = null)
    {
        if (is_object($this->content) && property_exists($this->content, 'columns') && !is_null($this->content->columns)) {
            return $this->content->columns;
        }

        if (is_null($size)) {
            $size = $this->baseSize;
        }
        $columnAttribute = $size . 'Columns';

        return $this->{$columnAttribute};
    }
543864
protected function getDimensionsFromAnsicon() : ?array
    {
        if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
            return [
                'width'  => (int) $matches[1],
                'height' => (int) ($matches[4] ?? $matches[2])
            ];
        }

        return null;
    }
1361987
protected function parseSize($size)
    {
        $result = null;
        $size = (string) $size;
        $matches = null;
        if (preg_match('/^\s*(\d+(?:\.\d*)?)\s*(?:([bkmgtpezy])b?)?\s*/i', $size, $matches)) {
            $value = (float) $matches[1];
            $unit = empty($matches[2]) ? 'b' : strtolower($matches[2]);
            if ($unit === 'b') {
                $result = (int) $value;
            } else {
                $result = (int) round($value * pow(1024, strpos('bkmgtpezy', $unit)));
            }
        }

        return $result;
    }
835318
protected List<Integer> getPageSizes() {

        try {
            return Collections.singletonList(Integer.valueOf(m_configObject.getInt(JSON_KEY_PAGESIZE)));
        } catch (JSONException e) {
            List<Integer> result = null;
            String pageSizesString = null;
            try {
                pageSizesString = m_configObject.getString(JSON_KEY_PAGESIZE);
                String[] pageSizesArray = pageSizesString.split("-");
                if (pageSizesArray.length > 0) {
                    result = new ArrayList<>(pageSizesArray.length);
                    for (int i = 0; i < pageSizesArray.length; i++) {
                        result.add(Integer.valueOf(pageSizesArray[i]));
                    }
                }
                return result;
            } catch (NumberFormatException | JSONException e1) {
                LOG.warn(Messages.get().getBundle().key(Messages.LOG_PARSING_PAGE_SIZES_FAILED_1, pageSizesString), e);
            }
            if (null == m_baseConfig) {
                if (LOG.isInfoEnabled()) {
                    LOG.info(Messages.get().getBundle().key(Messages.LOG_NO_PAGESIZE_SPECIFIED_0), e);
                }
                return null;
            } else {
                return m_baseConfig.getPaginationConfig().getPageSizes();
            }
        }
    }
1102686
function getsize($size)
    {
        $last = strtolower($size{strlen($size) - 1});
        switch ($last) {
            case 'g':
                $size *= 1024;
            case 'm':
                $size *= 1024;
            case 'k':
                $size *= 1024;
        }

        return $size;
    }
371919
protected function getModelPageSize()
    {
        $pageSize = $this->getModelInformation()->list->page_size;

        if (is_array($pageSize)) {
            return (int) head($pageSize);
        }

        return (int) $pageSize;
    }
1094402
public function withSizes(array $sizes)
    {
        $res = clone $this;

        $res->sizes = $res->fillArrayInput($sizes);

        return $res;
    }
727157
protected function getSize($file)
    {
        if (! file_exists($file)) {
            return [];
        }

        $info = pathinfo($file);
        $image = null;
        switch (strtolower($info['extension'])) {
            case 'gif':
                $image = imagecreatefromgif($file);
                break;
            case 'jpg':
            case 'jpeg':
                $image = imagecreatefromjpeg($file);
                break;
            case 'png':
                $image = imagecreatefrompng($file);
                break;
            default:
                break;
        }
        if ($image == null) {
            return [];
        } else {
            return [imagesx($image), imagesy($image)];
        }
    }
1334464
private function checkPageSize($pageSize)
    {
        if (!in_array($pageSize, $this->availablePageSizes)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Invalid pageSize, "%s" given. Available pageSize are %s.',
                    $pageSize,
                    implode(', ', $this->availablePageSizes)
                )
            );
        }
    }
294803
public function pagesize($pagesize = null)
    {
        if ($pagesize === null) {
            return $this->options['pagesize'];
        } else {
            $this->options['pagesize'] = intval($pagesize);
            return $this;
        }
    }
1248153
public function getImageSizeInBox(array $imageSize, array $boxSize)
    {
        list($imageWidth, $imageHeight) = $imageSize;
        list($boxWidth, $boxHeight) = $boxSize;

        if (($imageWidth <= $boxWidth) && ($imageHeight <= $boxHeight)) {
            return $imageSize;
        }

        $resizeRatio = min($boxWidth / $imageWidth, $boxHeight / $imageHeight);

        $imageWidth = ceil($imageWidth * $resizeRatio);

        if ($imageWidth > $boxWidth) {
            $imageWidth = $boxWidth;
        }

        $imageHeight = ceil($imageHeight * $resizeRatio);

        if ($imageHeight > $boxHeight) {
            $imageHeight = $boxHeight;
        }

        return array($imageWidth, $imageHeight);
    }
369081
private static int[] calculateMultipartSize(long size)
    throws InvalidArgumentException {
    if (size > MAX_OBJECT_SIZE) {
      throw new InvalidArgumentException("size " + size + " is greater than allowed size 5TiB");
    }

    double partSize = Math.ceil((double) size / MAX_MULTIPART_COUNT);
    partSize = Math.ceil(partSize / MIN_MULTIPART_SIZE) * MIN_MULTIPART_SIZE;

    double partCount = Math.ceil(size / partSize);

    double lastPartSize = partSize - (partSize * partCount - size);
    if (lastPartSize == 0.0) {
      lastPartSize = partSize;
    }

    return new int[] { (int) partSize, (int) partCount, (int) lastPartSize };
  }