mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
출력 값의 형식을 단순하게 수정
This commit is contained in:
parent
32d734059d
commit
edc674a220
1 changed files with 4 additions and 7 deletions
|
|
@ -238,8 +238,8 @@ class VariableBase
|
||||||
break;
|
break;
|
||||||
case 'search':
|
case 'search':
|
||||||
$parsed_keywords = $this->_parseSearchKeywords($value);
|
$parsed_keywords = $this->_parseSearchKeywords($value);
|
||||||
$where = $parsed_keywords->where;
|
$where = $parsed_keywords[0];
|
||||||
$params = $parsed_keywords->params;
|
$params = $parsed_keywords[1];
|
||||||
break;
|
break;
|
||||||
case 'plus':
|
case 'plus':
|
||||||
$where = sprintf('%s = %s + %s', $column, $column, $is_expression ? $value : '?');
|
$where = sprintf('%s = %s + %s', $column, $column, $is_expression ? $value : '?');
|
||||||
|
|
@ -436,7 +436,7 @@ class VariableBase
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
private function _parseSearchKeywords($value)
|
private function _parseSearchKeywords() ($value)
|
||||||
{
|
{
|
||||||
// parse the value (text)
|
// parse the value (text)
|
||||||
$keywords = preg_split('/("[^"]*")|[\s,]+/', trim($value), 10, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE);
|
$keywords = preg_split('/("[^"]*")|[\s,]+/', trim($value), 10, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE);
|
||||||
|
|
@ -491,9 +491,6 @@ class VariableBase
|
||||||
$conditions = implode(' ', $conditions);
|
$conditions = implode(' ', $conditions);
|
||||||
$where = count($keywords) === 1 ? $conditions : "($conditions)";
|
$where = count($keywords) === 1 ? $conditions : "($conditions)";
|
||||||
|
|
||||||
return (object) array (
|
return [$where, $params];
|
||||||
'where' => $where,
|
|
||||||
'params' => $params
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue