Contains
Less than 1 minute
Contains
class Contains extends \Hazaar\Model\Attribute\BaseExtends: Hazaar\Model\Attribute\Base
Properties
value
The value that must be contained in the property.
private string $valueType: string
Methods
__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): 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) |
getReason
Returns a human-readable reason for attribute rule failure.
public getReason(): stringReturns: string
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000