src/Glacier/MultipartUploader.php
private static function parseRange($range, $partSize)
    {
        // Strip away the prefix and suffix.
        if (strpos($range, 'bytes') !== false) {
            $range = substr($range, 6, -2);
        }

        // Split that range into it's parts.
        list($firstByte, $lastByte) = explode('-', $range);

        // Calculate and return range index and range size
        return [
            intval($firstByte / $partSize) + 1,
            $lastByte - $firstByte + 1,
        ];
    }
private static function parseRange($range, $partSize)
    {
        // Strip away the prefix and suffix.
        if (strpos($range, 'bytes') !== false) {
            $range = substr($range, 6, -2);
        }

        // Split that range into it's parts.
        list($firstByte, $lastByte) = explode('-', $range);

        // Calculate and return range index and range size
        return [
            intval($firstByte / $partSize) + 1,
            $lastByte - $firstByte + 1,
        ];
    }
private static function parseRange ( $ range , $ partSize ) { // Strip away the prefix and suffix. if ( strpos ( $ range , 'bytes' ) !== false ) { $ range = substr ( $ range , 6 , - 2 ) ; } // Split that range into it's parts. list ( $ firstByte , $ lastByte ) = explode ( '-' , $ range ) ; // Calculate and return range index and range size return [ intval ( $ firstByte / $ partSize ) + 1 , $ lastByte - $ firstByte + 1 , ] ; }
Parses a Glacier range string into a size and part number.

@param string $range    Glacier range string (e.g., "bytes 5-5000/*")
@param int    $partSize The chosen part size

@return array
Parses a Glacier range string into a size and part number .