Abstract Class Yiisoft\Data\Reader\Filter\Compare
Compare filter is a base class that defines a criteria for comparing field value with a given value.
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $field | string | Yiisoft\Data\Reader\Filter\Compare | |
| $value | boolean|DateTimeInterface|float|integer|string|\Stringable | Yiisoft\Data\Reader\Filter\Compare |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Data\Reader\Filter\Compare | |
| withValue() | Yiisoft\Data\Reader\Filter\Compare |
Property Details
Method Details
| public mixed __construct ( string $field, boolean|DateTimeInterface|float|integer|string|\Stringable $value ) | ||
| $field | string |
Name of the field to compare. |
| $value | boolean|DateTimeInterface|float|integer|string|\Stringable |
Value to compare to. |
final public function __construct(
public readonly string $field,
public readonly bool|DateTimeInterface|float|int|string|Stringable $value,
) {}
| public Yiisoft\Data\Reader\Filter\Compare withValue ( boolean|DateTimeInterface|float|integer|string|\Stringable $value ) | ||
| $value | boolean|DateTimeInterface|float|integer|string|\Stringable |
Value to compare to. |
final public function withValue(bool|DateTimeInterface|float|int|string|Stringable $value): static
{
return new static($this->field, $value);
}
Signup or Login in order to comment.