__destruct() 方法 public void __destruct() 源码: sdk/php/lib/XSServer.class.php#L154 (显示) public function __destruct(){ $this->xs = null; $this->close();} 析构函数, 关闭连接
.../lib/XSServer.class.php#L438 (显示) protected function check(){ if ($this->_sock === null) { throw new XSException('No server connection'); } if ($this->_flag & self::BROKEN) { throw new XSException('Broken server connection'); }} 检测服务端的连接情况
...s.php#L387 (显示) public function getDefaultCharset(){ return isset($this->_config['project.default_charset']) ? strtoupper($this->_config['project.default_charset']) : 'UTF-8';} 获取项目的默认字符集
...ueryString($query, $addOp = XS_CMD_QUERY_OP_AND, $scale = 1){ $query = $this->preQueryString($query); $bscale = ($scale > 0 && $scale != 1) ? pack('n', intval($scale * 100)) : ''; $cmd = new XSCommand(XS_CMD_QUERY_PARSE, $addOp, $this->_defaultOp, $query, $bscale); $this->execCommand($cm...
... = null){ $terms = array(); for ($i = 0; $i < strlen($value); $i += $this->arg) { $terms[] = substr($value, $i, $this->arg); } return $terms;}
__destruct() 方法 public void __destruct() 源码: sdk/php/lib/XS.class.php#L304 (显示) public function __destruct(){ $this->_index = null; $this->_search = null;} 析构函数 由于对象交叉引用, 如需提前销毁对象, 请强制调用该函数
... { ! if (!SCWS_IS_DIGIT(ch)) { // strict must add: !$this->_is_digit(ord($this->txt[$start+1]))) if ((pflag & PFLAG_ADDSYM) || ch != 0x2e || !SCWS_IS_DIGIT(txt[start+1])) break; ! pflag |= PFLAG_ADDSYM; } } else { ! ...
...: sdk/php/lib/XSIndex.class.php#L59 (显示) public function clean(){ $this->execCommand(XS_CMD_INDEX_CLEAN_DB, XS_CMD_OK_DB_CLEAN); return $this;} 完全清空索引数据 如果当前数据库处于重建过程中将禁止清空
...n getTokens($value, XSDocument $doc = null){ $terms = array(); $i = $this->arg; while (true) { $terms[] = substr($value, 0, $i); if ($i >= strlen($value)) { break; } $i += $this->arg; } return $terms;}
...search函数,在返回代码附近有: if ($query === '') { $this->_count = $tmp['count']; $this->logQuery(); } 的代码,在开启了分面功能时,$tmp对象在获取分面数据时被重置了,运行到上面的代码时,大家都没有出错?(php5.2.9)