Happyr\DoctrineSpecification\Filter\Comparison::__construct PHP Method

__construct() public method

Make sure the $field has a value equals to $value.
public __construct ( string $operator, string $field, string $value, string $dqlAlias = null )
$operator string
$field string
$value string
$dqlAlias string
    public function __construct($operator, $field, $value, $dqlAlias = null)
    {
        if (!in_array($operator, self::$operators)) {
            throw new InvalidArgumentException(sprintf('"%s" is not a valid comparison operator. Valid operators are: "%s"', $operator, implode(', ', self::$operators)));
        }
        $this->operator = $operator;
        $this->field = $field;
        $this->value = $value;
        $this->dqlAlias = $dqlAlias;
    }