... return $value; } // initlize the highlight replacements if (!is_array($this->_highlight)) { $this->initHighlight(); } // process replace if (isset($this->_highlight['pattern'])) { $value = preg_replace($this->_highlight['pattern'], $this->_highlight['replace'], $...
... if ($to == $from) { return $data; } // array traverse if (is_array($data)) { foreach ($data as $key => $value) { $data[$key] = self::convert($value, $to, $from); } return $data; } // string contain 8bit characters if (is_string($data) && preg...
...__construct($name, $config = null){ $this->name = strval($name); if (is_array($config)) { $this->fromConfig($config); }} 构造函数 __toString() 方法 public string __toString() {return} string 字段名称 源码: sdk/php/lib/XSFieldScheme.class.php#L310...
...->xs->getField($field); // get commands $cmds = array(); $terms = is_array($term) ? array_unique($term) : array($term); $terms = XS::convert($terms, 'UTF-8', $this->xs->getDefaultCharset()); foreach ($terms as $term) { $cmds[] = new XSCommand(XS_CMD_INDEX_REMOVE, 0, $field->vno...