Contains
Less than 1 minute
Contains
class Contains extends \Hazaar\Model\Attribute\BaseProperties
value
The value that must be contained in the property.
private string $valueMethods
__construct
Constructor for the Contains attribute.
public __construct(string $value): voidParameters
| Parameter | Type | Description |
|---|---|---|
$value | string | the value that must be present in the property |
evaluate
Evaluates whether the property value contains the required value.
public evaluate(mixed $propertyValue, \ReflectionProperty $property): boolParameters
| 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) |
getReason
Returns a human-readable reason for attribute rule failure.
public getReason(): stringGenerated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:23 +0000