设置内容模板参数
@param array|string $value 模板参数
438683
public function setTtsParam($value)
    {
        if (is_array($value)) {
            $value = Support::jsonStr($value);
        }

        $this->params['tts_param'] = $value;

        return $this;
    }
1145782
private function prepareValue($value)
    {
        if (is_array($value)) {
            foreach ($value as &$val) {
                if (is_array($val) and count($val) === 1) {
                    $val = array_shift($val);
                }
            }
            unset($val);

            if (count($value) === 1) {
                $value = array_shift($value);
            }
        }

        return $value;
    }
1364088
public function setJsonValue(array $value)
    {
        $value = array_map(
            function ($item) {
                return strtr(implode('/', $item), [':' => '', '-' => '']);
            },
            $value
        );
        parent::setJsonValue($value);
    }
656390
public function setValue(string $value = null) : Element
    {
        if (!is_null($value)) {
            $tmp = preg_replace('/[^\d]/', '', $value);
            if (strlen($tmp)) {
                $value = $tmp;
                if ($value{0} != '0') {
                    $value = "0$value";
                }
            }
        }
        return parent::setValue($value);
    }
791017
protected function encode($value)
    {
        if (is_array($value)) {
            return array_map([$this, 'encode'], $value);
        } else {
            return str_replace(['+', '%7E'], [' ', '~'], rawurlencode($value));
        }
    }
1114866
public function setStringValue($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->string_value = $value;
    }
880422
public function setValue($value)
    {
        if (is_array($value)) {
            $value = implode(', ', $value);
        }

        if (!is_null($value)) {
            $this->_value = $value;
            $this->appendChild($value);
        }
    }
553207
public function setValue($value) {
		if(is_string($value) && $this->getOption('trim'))
			$value = trim($value);

		$this->value = $value;
	}
1072971
public static function set($key, $value = null)
    {
        if (is_array($key)) {
            static::$lang = array_merge(static::$lang, array_change_key_case($key));
        } else {
            $key = strtolower($key);

            if (!strpos($key, '.')) {
                static::$lang[$key] = $value;
                return null;
            }

            // 多维数组设置 A.B.C = 1
            $key = explode('.', $key);
            $tmp = null;
            foreach ($key as $k) {
                if (is_null($tmp)) {
                    if (isset(static::$lang[$k]) === false) {
                        static::$lang[$k] = [];
                    }
                    $tmp = &static::$lang[$k];
                } else {
                    is_array($tmp) || $tmp = [];
                    isset($tmp[$k]) || $tmp[$k] = [];
                    $tmp = &$tmp[$k];
                }
            }
            $tmp = $value;
            unset($tmp);
        }
        return null;
    }
671224
public function set($name, $value = null)
	{
		if (is_array($name))
		{
			// 如果传入数组就合并当前数据
			$this->data = multimerge($this->data,$name);
		}
		else
		{
			// 设置数据
			$this->data[$name] = $value;
		}
		return true;
	}
352274
private function itemWithoutKey(string $value): array
    {
        $value = $this->formatSort($value);
        $arr = explode(' ', $value);

        // 每一项排序依据最多是二项,(列名+升降)
        if (count($arr) > 2) {
            trigger_error('指定排序的语法错误:' . json($arr), E_USER_ERROR);
        }

        // 只指明了一个值,默认升序
        if (count($arr) == 1) {
            $arr[1] = 'asc';
        }

        // 排序的字段和方向
        return $arr;
    }
6232
public function setContent($value)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->Content = $value;
    }
581754
public void setValue(String value) {
		contents = new ArrayList();
		contents.add(value);
		if (value.trim().length() > 0) {
			containsSingleString = true;
		}
	}
204211
public function _prepValues($value)
    {
        if (is_array($value)) {
            if (isset($value["func"])) {
                return $value["func"];
            }
            foreach ($value as &$param) {
                $this->params[] = $param;
                $param = "?";
            }
            unset($param);
            return $value;
        }
        if (in_array(is_string($value) ? strtolower($value) : $value, [null, "null"]) === false) {
            $this->params[] = $value;
            $value = "?";
        }
        return $value;
    }
291717
public function setValue($value) {
		if(is_array($this->content)){
			foreach ($this->content as $i=>$content){
				if(is_string($content)){
					$this->content[$i]=$value;
					return $this;
				}
			}
		}
		$this->content=$value;
		return $this;
	}
950538
public function value($value)
    {
        if (is_null($value)) $value = '';
        $this->value = (string)$value;
        return $this;
    }
760025
public function setValue($value)
    {
        $this->clear();

        if (!is_array($value)) {
            $value = [$value];
        }

        foreach ($value as $argument) {
            $this[] = $argument;
        }
    }