Filter
Less than 1 minute
Filter
class Filter extends \Hazaar\Model\Attribute\BaseProperties
type
public int $typeoptions
public int $optionsMethods
__construct
Create a new Filter rule.
public __construct(int $type, 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 | int | Additional options for the filter. See https://www.php.net/manual/en/filter.filters.validate.php |
evaluate
Evaluates the property value using the specified filter type and options.
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(): stringgetFilterName
Get the name of a filter constant.
public getFilterName(): stringGenerated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:23 +0000