AttributeRule
Less than 1 minute
AttributeRule
interface AttributeRuleMethods
evaluate
Evaluate the attribute rule against the value.
public evaluate(mixed $value, \ReflectionProperty $property): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | mixed | |
$property | ReflectionProperty |
serialize
Evaluate the attribute rule against the value when serializing.
public serialize(mixed $value, \ReflectionProperty $property, ?array $context): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | mixed | |
$property | ReflectionProperty | |
$context | array |
getReason
Returns the reason to display if an attribute error occurs.
public getReason(): stringReturns: string
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000