protected function parseKey($key, $and = true, $noCondition = false, $noTable = false)
{
$condition = '';
$arr = explode('-', $key);
$len = count($arr);
for ($i = 1; $i < $len; $i += 2) {
isset($arr[$i + 1]) && ($condition .= ($condition ? $and ? ' AND ' : ' OR ' : '') . "`{$arr[$i]}` = %s");
$this->bindParams[] = $arr[$i + 1];
}
$table = strtolower($arr[0]);
if (empty($table) && !$noTable) {
throw new \InvalidArgumentException(Lang::get('_DB_PARAM_ERROR_PARSE_KEY_', $key, 'table'));
}
if (empty($condition) && !$noCondition) {
throw new \InvalidArgumentException(Lang::get('_DB_PARAM_ERROR_PARSE_KEY_', $key, 'condition'));
}
empty($condition) || ($condition = "({$condition})");
return [$table, $condition];
}