Dimensions
in package
Table of Contents
- $constraints : array<string|int, mixed>
- The constraints for the dimensions rule.
- __construct() : void
- Create a new dimensions rule instance.
- __toString() : string
- Convert the rule to a validation string.
- height() : $this
- Set the "height" constraint.
- maxHeight() : $this
- Set the "max height" constraint.
- maxWidth() : $this
- Set the "max width" constraint.
- minHeight() : $this
- Set the "min height" constraint.
- minWidth() : $this
- Set the "min width" constraint.
- ratio() : $this
- Set the "ratio" constraint.
- width() : $this
- Set the "width" constraint.
Properties
$constraints
The constraints for the dimensions rule.
protected
array<string|int, mixed>
$constraints
= []
Methods
__construct()
Create a new dimensions rule instance.
public
__construct([array<string|int, mixed> $constraints = [] ]) : void
Parameters
- $constraints : array<string|int, mixed> = []
Return values
void —__toString()
Convert the rule to a validation string.
public
__toString() : string
Return values
string —height()
Set the "height" constraint.
public
height(int $value) : $this
Parameters
- $value : int
Return values
$this —maxHeight()
Set the "max height" constraint.
public
maxHeight(int $value) : $this
Parameters
- $value : int
Return values
$this —maxWidth()
Set the "max width" constraint.
public
maxWidth(int $value) : $this
Parameters
- $value : int
Return values
$this —minHeight()
Set the "min height" constraint.
public
minHeight(int $value) : $this
Parameters
- $value : int
Return values
$this —minWidth()
Set the "min width" constraint.
public
minWidth(int $value) : $this
Parameters
- $value : int
Return values
$this —ratio()
Set the "ratio" constraint.
public
ratio(float $value) : $this
Parameters
- $value : float
Return values
$this —width()
Set the "width" constraint.
public
width(int $value) : $this
Parameters
- $value : int