Revert "改名"
This reverts commit fdf58326
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Condition;
|
||||
|
||||
/**
|
||||
* Class HashCondition
|
||||
* @package Yoc\db\condition
|
||||
*/
|
||||
class HashCondition extends Condition
|
||||
{
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function builder(): string
|
||||
{
|
||||
$array = [];
|
||||
if (empty($this->value)) {
|
||||
return '';
|
||||
}
|
||||
foreach ($this->value as $key => $value) {
|
||||
if (is_null($value)) continue;
|
||||
|
||||
$array[] = sprintf("%s = '%s'", $key, addslashes($value));
|
||||
}
|
||||
return implode(' AND ', $array);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user