AttributeRule
Less than 1 minute
AttributeRule
interface AttributeRuleMethods
evaluate
Evaluate the attribute rule against the value.
public evaluate(mixed $value, \ReflectionProperty $property): boolParameters
| 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): boolParameters
| Parameter | Type | Description |
|---|---|---|
$value | mixed | |
$property | \ReflectionProperty | |
$context | array |
getReason
Returns the reason to display if an attribute error occurs.
public getReason(): stringGenerated by Hazaar API Doc Generator on Fri, 05 Jun 2026 06:08:14 +0000