Skip to content

ContentRange

  • Full name: \Qubus\Http\Emitter\ContentRange

Properties

start

private int $start

end

private int $end

size

private ?int $size

unit

private string $unit

Methods

__construct

public __construct(int $start, int $end, null|int $size = null, string $unit = 'bytes'): void

Parameters:

Parameter Type Description
$start int An integer in the given unit indicating the beginning
of the request range.
$end int An integer in the given unit indicating the end of the
requested range.
$size null|int The total size of the document.
$unit string The unit in which ranges are specified. This is
usually bytes.

Throws:


getUnit

Get the unit in which ranges are specified. This is usually bytes.

public getUnit(): string

setUnit

Set the unit in which ranges are specified. This is usually bytes.

public setUnit(string $unit): \Qubus\Http\Emitter\ContentRange

Parameters:

Parameter Type Description
$unit string The unit in which ranges are specified. This is
usually bytes.

getStart

Get the beginning of the request range.

public getStart(): int

setStart

Set the beginning of the request range.

public setStart(int $start): \Qubus\Http\Emitter\ContentRange

Parameters:

Parameter Type Description
$start int the beginning of the request range.

Throws:


getEnd

Get an integer in the given unit indicating the end of the requested range.

public getEnd(): int

setEnd

Set an integer in the given unit indicating the end of the requested range.

public setEnd(int $end): \Qubus\Http\Emitter\ContentRange

Parameters:

Parameter Type Description
$end int An integer in the given unit indicating the
end of the requested range.

getSize

Get the total size of the document.

public getSize(): int|null

setSize

Set the total size of the document.

public setSize(int|null $size): self

Parameters:

Parameter Type Description
$size int|null The total size of the document.


Automatically generated on 2025-10-13