web-base/Core/Driver/SQL/Condition/Compare.class.php

21 lines
505 B
PHP
Raw Normal View History

2020-04-02 00:02:51 +02:00
<?php
2022-11-18 18:06:46 +01:00
namespace Core\Driver\SQL\Condition;
2020-04-02 00:02:51 +02:00
class Compare extends Condition {
2020-04-03 17:39:58 +02:00
private string $operator;
2021-04-08 19:48:04 +02:00
private string $column;
2020-04-03 17:39:58 +02:00
private $value;
2021-04-08 19:48:04 +02:00
public function __construct(string $col, $val, string $operator = '=') {
2020-04-02 00:02:51 +02:00
$this->operator = $operator;
2021-04-08 19:48:04 +02:00
$this->column = $col;
2020-04-02 00:02:51 +02:00
$this->value = $val;
}
2021-04-08 19:48:04 +02:00
public function getColumn(): string { return $this->column; }
2020-04-02 00:02:51 +02:00
public function getValue() { return $this->value; }
2021-04-02 21:58:06 +02:00
public function getOperator(): string { return $this->operator; }
2020-04-02 00:02:51 +02:00
2020-04-03 17:39:58 +02:00
}