This commit is contained in:
Gregory Letellier
2023-10-26 14:34:20 +02:00
commit a2dc633be4
14 changed files with 5206 additions and 0 deletions

55
src/Expression.php Normal file
View File

@@ -0,0 +1,55 @@
<?php
namespace Kletellier\PdoWrapper;
class Expression
{
private $condition;
private $operator;
private $value;
public function __construct($condition, $operator, $value)
{
$this->condition = $condition;
$this->operator = $operator;
$this->value = $value;
}
public function raw(): string
{
return "(" . $this->condition . " " . $this->operator . " ? )";
}
public function getCondition()
{
return $this->condition;
}
public function setCondition($condition)
{
$this->condition = $condition;
return $this;
}
public function getOperator()
{
return $this->operator;
}
public function setOperator($operator)
{
$this->operator = $operator;
return $this;
}
public function getValue()
{
return $this->value;
}
public function setValue($value)
{
$this->value = $value;
return $this;
}
}