code/dispatcher/response/transport/stream.php
public function getRange(DispatcherResponseInterface $response)
    {
        if(!isset($this->_range))
        {
            $length = $this->getFileSize($response);
            $range  = $length - 1;

            if($response->getRequest()->isStreaming())
            {
                $ranges = $response->getRequest()->getRanges();

                if (!empty($ranges[0]['last'])) {
                    $range = (int) $ranges[0]['last'];
                }

                if($range > $length - 1) {
                    $range = $length - 1;
                }
            }

            $this->_range = $range;
        }

        return $this->_range;
    }
public function getRange(DispatcherResponseInterface $response)
    {
        if(!isset($this->_range))
        {
            $length = $this->getFileSize($response);
            $range  = $length - 1;

            if($response->getRequest()->isStreaming())
            {
                $ranges = $response->getRequest()->getRanges();

                if (!empty($ranges[0]['last'])) {
                    $range = (int) $ranges[0]['last'];
                }

                if($range > $length - 1) {
                    $range = $length - 1;
                }
            }

            $this->_range = $range;
        }

        return $this->_range;
    }
public function getRange ( DispatcherResponseInterface $ response ) { if ( ! isset ( $ this -> _range ) ) { $ length = $ this -> getFileSize ( $ response ) ; $ range = $ length - 1 ; if ( $ response -> getRequest ( ) -> isStreaming ( ) ) { $ ranges = $ response -> getRequest ( ) -> getRanges ( ) ; if ( ! empty ( $ ranges [ 0 ] [ 'last' ] ) ) { $ range = ( int ) $ ranges [ 0 ] [ 'last' ] ; } if ( $ range > $ length - 1 ) { $ range = $ length - 1 ; } } $ this -> _range = $ range ; } return $ this -> _range ; }
Get the byte range

@param DispatcherResponseInterface $response
@return int The last byte offset
Get the byte range