code/libraries/joomlatools/library/dispatcher/request/abstract.php
public function getRanges()
    {
        if(!isset($this->_ranges))
        {
            $this->_ranges = array();

            if($this->_headers->has('Range'))
            {
                $range  = $this->_headers->get('Range');

                if(!preg_match('/^bytes=((\d*-\d*,? ?)+)$/', $range)) {
                    throw new KHttpExceptionRangeNotSatisfied('Invalid range');
                }

                $ranges = explode(',', substr($range, 6));
                foreach ($ranges as $key => $range)
                {
                    $parts = explode('-', $range);
                    $first = $parts[0];
                    $last  = $parts[1];

                    $ranges[$key] = array('first' => $first, 'last' => $last);
                }

                $this->_ranges = $ranges;
            }
        }

        return $this->_ranges;
    }
public function getRanges()
    {
        if(!isset($this->_ranges))
        {
            $this->_ranges = array();

            if($this->_headers->has('Range'))
            {
                $range  = $this->_headers->get('Range');

                if(!preg_match('/^bytes=((\d*-\d*,? ?)+)$/', $range)) {
                    throw new KHttpExceptionRangeNotSatisfied('Invalid range');
                }

                $ranges = explode(',', substr($range, 6));
                foreach ($ranges as $key => $range)
                {
                    $parts = explode('-', $range);
                    $first = $parts[0];
                    $last  = $parts[1];

                    $ranges[$key] = array('first' => $first, 'last' => $last);
                }

                $this->_ranges = $ranges;
            }
        }

        return $this->_ranges;
    }
public function getRanges ( ) { if ( ! isset ( $ this -> _ranges ) ) { $ this -> _ranges = array ( ) ; if ( $ this -> _headers -> has ( 'Range' ) ) { $ range = $ this -> _headers -> get ( 'Range' ) ; if ( ! preg_match ( '/^bytes=((\d*-\d*,? ?)+)$/' , $ range ) ) { throw new KHttpExceptionRangeNotSatisfied ( 'Invalid range' ) ; } $ ranges = explode ( ',' , substr ( $ range , 6 ) ) ; foreach ( $ ranges as $ key => $ range ) { $ parts = explode ( '-' , $ range ) ; $ first = $ parts [ 0 ] ; $ last = $ parts [ 1 ] ; $ ranges [ $ key ] = array ( 'first' => $ first , 'last' => $ last ) ; } $ this -> _ranges = $ ranges ; } } return $ this -> _ranges ; }
Gets the request ranges

@link : http://tools.ietf.org/html/rfc2616#section-14.35

@throws KHttpExceptionRangeNotSatisfied If the range info is not valid or if the start offset is large then the end offset
@return array List of request ranges
Gets the request ranges