...cmd as $key => $value) { if ($key === 'arg' || property_exists($this, $key)) { $this->$key = $value; } } } else { $this->cmd = $cmd; $this->arg1 = $arg1; $this->arg2 = $arg2; $this->buf = $buf; $this->buf1 = $buf1; ...
...L475 (显示) public function setDb($name){ $name = strval($name); $this->execCommand(array('cmd' => XS_CMD_SEARCH_SET_DB, 'buf' => strval($name))); $this->_lastDb = $this->_curDb; $this->_lastDbs = $this->_curDbs; $this->_curDb = $name; $this->_curDbs = array(); return $this;}...
...$field, $term, $weight = 1){ $field = strval($field); if (!is_array($this->_terms)) { $this->_terms = array(); } if (!isset($this->_terms[$field])) { $this->_terms[$field] = array($term => $weight); } elseif (!isset($this->_terms[$field][$term])) { $this->_terms[$...
...ent.class.php#L108 (显示) public function __call($name, $args){ if ($this->_meta !== null) { $name = strtolower($name); if (isset($this->_meta[$name])) { return $this->_meta[$name]; } } throw new XSException('Call to undefined method `' . get_class($this) ...
...c function __get($name){ $getter = 'get' . $name; if (method_exists($this, $getter)) { return $this->$getter(); } // throw exception $msg = method_exists($this, 'set' . $name) ? 'Write-only' : 'Undefined'; $msg .= ' property: ' . get_class($this) . '::$' . $name; throw ne...
...示) 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); }} 批量设置字段值 这里是以合并方式赋值, 即不会清...
...on __set($name, $value){ $setter = 'set' . $name; if (method_exists($this, $setter)) { return $this->$setter($value); } // throw exception $msg = method_exists($this, 'get' . $name) ? 'Read-only' : 'Undefined'; $msg .= ' property: ' . get_class($this) . '::$' . $name; thr...
...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->_...
...p/lib/XS.class.php#L467 (显示) public function getScwsServer(){ if ($this->_scws === null) { $conn = isset($this->_config['server.search']) ? $this->_config['server.search'] : 8384; $this->_scws = new XSServer($conn, $this); } return $this->_scws;} 创建 scws 分词连...
...n __construct($arg = null){ if ($arg !== null && $arg !== '') { $this->arg = $arg; }} getTokens() 方法 public void getTokens($value, $doc=NULL) $value $doc 源码: sdk/php/lib/XSTokenizer.class.php#L86 (显示) public function getTokens($value, ...