Filter
Less than 1 minute
Filter
class Filter extends \Hazaar\Model\Attribute\BaseExtends: Hazaar\Model\Attribute\Base
Properties
type
public int $typeType: int
options
Additional options for the filter.
private array|int $optionsType: array|int
Methods
__construct
Create a new Filter rule.
public __construct(int $type, array|int $options): voidParameters
| Parameter | Type | Description |
|---|---|---|
$type | int | The filter type to apply. See FILTER_VALIDATE_* constants at https://www.php.net/manual/en/filter.constants.php#constant.filter-validate-bool |
$options | array | int |
evaluate
Evaluates the property value using the specified filter type and options.
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
getFilterName
Get the name of a filter constant.
public getFilterName(): stringReturns: string
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000