public function getHTTPRange()
    {
        $range = $this->httpRequest->getHeader('range');
        if (is_null($range)) {
            return null;
        }

        // Matching "Range: bytes=1234-5678: both numbers are optional

        if (!preg_match('/^bytes=([0-9]*)-([0-9]*)$/i', $range, $matches)) {
            return null;
        }

        if ('' === $matches[1] && '' === $matches[2]) {
            return null;
        }

        return [
            '' !== $matches[1] ? (int) $matches[1] : null,
            '' !== $matches[2] ? (int) $matches[2] : null,
        ];
    }
public function getHTTPRange()
    {
        $range = $this->httpRequest->getHeader('range');
        if (is_null($range)) {
            return null;
        }

        // Matching "Range: bytes=1234-5678: both numbers are optional

        if (!preg_match('/^bytes=([0-9]*)-([0-9]*)$/i', $range, $matches)) {
            return null;
        }

        if ('' === $matches[1] && '' === $matches[2]) {
            return null;
        }

        return [
            '' !== $matches[1] ? (int) $matches[1] : null,
            '' !== $matches[2] ? (int) $matches[2] : null,
        ];
    }
public function getHTTPRange ( ) { $ range = $ this -> httpRequest -> getHeader ( 'range' ) ; if ( is_null ( $ range ) ) { return null ; } // Matching "Range: bytes=1234-5678: both numbers are optional if ( ! preg_match ( '/^bytes=([0-9]*)-([0-9]*)$/i' , $ range , $ matches ) ) { return null ; } if ( '' === $ matches [ 1 ] && '' === $ matches [ 2 ] ) { return null ; } return [ '' !== $ matches [ 1 ] ? ( int ) $ matches [ 1 ] : null , '' !== $ matches [ 2 ] ? ( int ) $ matches [ 2 ] : null , ] ; }
Returns the HTTP range header.

This method returns null if there is no well-formed HTTP range request
header or array($start, $end).

The first number is the offset of the first byte in the range.
The second number is the offset of the last byte in the range.

If the second offset is null, it should be treated as the offset of the last byte of the entity
If the first offset is null, the second offset should be used to retrieve the last x bytes of the entity

@return int[]|null
Returns the HTTP range header .