2020-08-31 12:38:32 +08:00
|
|
|
<?php
|
2020-10-29 18:17:25 +08:00
|
|
|
declare(strict_types=1);
|
2020-08-31 12:38:32 +08:00
|
|
|
|
|
|
|
|
namespace Database\Condition;
|
|
|
|
|
|
|
|
|
|
|
2021-02-24 18:34:57 +08:00
|
|
|
use JetBrains\PhpStorm\Pure;
|
|
|
|
|
|
2020-08-31 12:38:32 +08:00
|
|
|
/**
|
|
|
|
|
* Class DefaultCondition
|
|
|
|
|
* @package Database\Condition
|
|
|
|
|
*/
|
|
|
|
|
class DefaultCondition extends Condition
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
2021-02-24 18:34:57 +08:00
|
|
|
#[Pure] public function builder(): string
|
2020-08-31 12:38:32 +08:00
|
|
|
{
|
2021-02-24 18:34:57 +08:00
|
|
|
return sprintf('%s %s %s', $this->column, $this->opera, addslashes($this->value));
|
2020-08-31 12:38:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|