0 follower

Abstract Class Yiisoft\Data\Reader\Filter\Compare

InheritanceYiisoft\Data\Reader\Filter\Compare
ImplementsYiisoft\Data\Reader\FilterInterface
SubclassesYiisoft\Data\Reader\Filter\Equals, Yiisoft\Data\Reader\Filter\GreaterThan, Yiisoft\Data\Reader\Filter\GreaterThanOrEqual, Yiisoft\Data\Reader\Filter\LessThan, Yiisoft\Data\Reader\Filter\LessThanOrEqual

Compare filter is a base class that defines a criteria for comparing field value with a given value.

Property Details

Hide inherited properties

$field public property
public string $field null
$value public property
public boolean|DateTimeInterface|float|integer|string|\Stringable $value null

Method Details

Hide inherited methods

__construct() public method

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,
) {}

            
withValue() public method

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);
}