class Dimensions

Properties

protected array $constraints

The constraints for the dimensions rule.

Methods

void
__construct(array $constraints = [])

Create a new dimensions rule instance.

$this
width(int $value)

Set the "width" constraint.

$this
height(int $value)

Set the "height" constraint.

$this
minWidth(int $value)

Set the "min width" constraint.

$this
minHeight(int $value)

Set the "min height" constraint.

$this
maxWidth(int $value)

Set the "max width" constraint.

$this
maxHeight(int $value)

Set the "max height" constraint.

$this
ratio(float $value)

Set the "ratio" constraint.

string
__toString()

Convert the rule to a validation string.

Details

at line 20
void __construct(array $constraints = [])

Create a new dimensions rule instance.

Parameters

array $constraints

Return Value

void

at line 31
$this width(int $value)

Set the "width" constraint.

Parameters

int $value

Return Value

$this

at line 44
$this height(int $value)

Set the "height" constraint.

Parameters

int $value

Return Value

$this

at line 57
$this minWidth(int $value)

Set the "min width" constraint.

Parameters

int $value

Return Value

$this

at line 70
$this minHeight(int $value)

Set the "min height" constraint.

Parameters

int $value

Return Value

$this

at line 83
$this maxWidth(int $value)

Set the "max width" constraint.

Parameters

int $value

Return Value

$this

at line 96
$this maxHeight(int $value)

Set the "max height" constraint.

Parameters

int $value

Return Value

$this

at line 109
$this ratio(float $value)

Set the "ratio" constraint.

Parameters

float $value

Return Value

$this

at line 121
string __toString()

Convert the rule to a validation string.

Return Value

string