class BreakpointsJson extends BaseQualifier

Class BreakpointsJson

An alias for w_auto:breakpoints:json qualifier

Methods

__construct(int $minWidth = null, int $maxWidth = null, int $bytesStep = null, int $maxImages = null)

BreakpointsJson qualifier constructor.

minWidth(int $minWidth)

Sets the minimum width.

maxWidth(int $maxWidth)

Sets the maximum width.

bytesStep(int $bytesStep)

Sets the size step (in bytes).

maxImages(int $maxImages)

Sets the maximum amount of breakpoints.

__toString()

Serializes to string.

jsonSerialize()

Serializes to json.

Details

__construct(int $minWidth = null, int $maxWidth = null, int $bytesStep = null, int $maxImages = null)

BreakpointsJson qualifier constructor.

Parameters

Name Type Description
$minWidth int The minimum width needed for this image. Default: 50.
$maxWidth int The maximum width needed for this image. If specifying a width bigger than the original image, the width of the original image is used instead. Default: 1000.
$bytesStep int The minimum number of bytes between two consecutive breakpoints (images). Default: 20000.
$maxImages int The maximum number of breakpoints to find, between 3 and 200. This means that there might be size differences bigger than the given bytes_step value between consecutive images. Default: 20.

BreakpointsJson minWidth(int $minWidth)

Sets the minimum width.

Parameters

Name Type Description
$minWidth int The minimum width needed for this image. Default: 50.

Return Value

BreakpointsJson

BreakpointsJson maxWidth(int $maxWidth)

Sets the maximum width.

Parameters

Name Type Description
$maxWidth int The maximum width needed for this image. If specifying a width bigger than the original image, the width of the original image is used instead. Default: 1000.

Return Value

BreakpointsJson

BreakpointsJson bytesStep(int $bytesStep)

Sets the size step (in bytes).

Parameters

Name Type Description
$bytesStep int The minimum number of bytes between two consecutive breakpoints (images). Default: 20000.

Return Value

BreakpointsJson

BreakpointsJson maxImages(int $maxImages)

Sets the maximum amount of breakpoints.

Parameters

Name Type Description
$maxImages int The maximum number of breakpoints to find, between 3 and 200. This means that there might be size differences bigger than the given bytes_step value between consecutive images. Default: 20.

Return Value

BreakpointsJson

string __toString()

Serializes to string.

Return Value

string

mixed jsonSerialize()

Serializes to json.

Return Value

mixed

Constants

DEFAULT_BYTES_STEP