...php#L33 (显示) public function __toString(){ $str = ''; foreach ($this->_fields as $field) { $str .= $field->toConfig() . "\n"; } return $str;} 将对象转换为配置文件字符串 addField() 方法 public void addField(mixed $field, array $config=NULL) $fi...
...示) public function __toString(){ $string = '[' . __CLASS__ . '] ' . $this->getRelPath($this->getFile()) . '(' . $this->getLine() . '): '; $string .= $this->getMessage() . ($this->getCode() > 0 ? '(S#' . $this->getCode() . ')' : ''); return $string;} 将类对象转换成字符串
...示) public function setFields($data){ if ($data === null) { $this->_data = array(); $this->_meta = $this->_terms = $this->_texts = null; } else { $this->_data = array_merge($this->_data, $data); }} 批量设置字段值 这里是以合并方式赋值, 即不会清...
...ta) { $field = new XSFieldMeta($field, $config); } if (isset($this->_fields[$field->name])) { throw new XSException('Duplicated field name: `' . $field->name . '\''); } if ($field->isSpeical()) { if (isset($this->_typeMap[$field->type])) { $prev = $this->_...
... $ret = array(); try { if ($query === null) { if ($this->_count > 0 && $this->_count > ceil($this->getDbTotal() * 0.001)) { return $ret; } $query = $this->cleanFieldQuery($this->_query); } if (empty($query) || strpos($query, ...
... return ((float)$usec + (float)$sec); } function scws() { $this -> so = scws_new(); $this -> so->set_charset('utf8'); $this -> so->set_ignore(1); // $this -> so->add_dict('dict.utf8.xdb'); if($this -> so->add_dict('mydict_utf8.txt', SCWS_XDICT_TXT)) { echo 'o...
...til/XSDataSource.class.php#L641 (显示) public function close(){ if ($this->obj) { $this->obj->close(); $this->obj = null; }} 关闭数据库连接 connect() 方法 public void connect(array $param) $param array 连接参数, 包含: user,pass,host,table,d...
...ex.class.php#L362 (显示) public function openBuffer($size = 4){ if ($this->_buf !== '') { $this->addExdata($this->_buf, false); } $this->_bufSize = intval($size) << 20; $this->_buf = ''; return $this;} 开启索引命令提交缓冲区 为优化网络性能, 有必要先...
... public function getTokens($value, XSDocument $doc = null){ if (strlen($this->arg) > 2 && substr($this->arg, 0, 1) == '/' && substr($this->arg, -1, 1) == '/') { return preg_split($this->arg, $value); } return explode($this->arg, $value);}
...terms($query = null, $convert = true){ $query = $query === null ? '' : $this->preQueryString($query); if ($query === '' && $this->_terms !== null) { $ret = $this->_terms; } else { $cmd = new XSCommand(XS_CMD_QUERY_GET_TERMS, 0, $this->_defaultOp, $query); $res = $this->...