Range
Less than 1 minute
Range
class Range extends \Hazaar\Model\Attribute\BaseExtends: Hazaar\Model\Attribute\Base
Properties
minValue
The minimum value allowed for the property.
private int $minValueType: int
maxValue
The maximum value allowed for the property.
private int $maxValueType: int
Methods
__construct
Constructor for the Range attribute.
public __construct(int $minValue, int $maxValue): voidParameters
| Parameter | Type | Description |
|---|---|---|
$minValue | int | the minimum value allowed for the property |
$maxValue | int | the maximum value allowed for the property |
evaluate
Ensures the property value is within the specified range.
public evaluate(mixed $propertyValue, \ReflectionProperty $property): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$propertyValue | mixed | the value of the property to evaluate (passed by reference) |
$property | ReflectionProperty | the reflection property instance for metadata (passed by reference) |
getMinValue
Gets the minimum value allowed for the property.
public getMinValue(): intReturns: int
getMaxValue
Gets the maximum value allowed for the property.
public getMaxValue(): intReturns: int
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000