__toString() 方法 public string __toString() {return} string 字段名称 源码: sdk/php/lib/XSFieldScheme.class.php#L310 (显示) public function __toString(){ return $this->name;} 将对象转换为字符串
__construct() 方法 public void __construct($arg=NULL) $arg 源码: sdk/php/lib/XSTokenizer.class.php#L79 (显示) public function __construct($arg = null){ if ($arg !== null && $arg !== '') { $this->arg = $arg; }}
__unset() 方法 public void __unset(string $name) $name string 属性名称 源码: sdk/php/lib/XS.class.php#L231 (显示) public function __unset($name){ $this->__set($name, null);} 魔术方法 __unset 删除、取消模拟属性, 相当于设置属性值为 null
...php#L33 (显示) public function __toString(){ $str = ''; foreach ($this->_fields as $field) { $str .= $field->toConfig() . "\n"; } return $str;} 将对象转换为配置文件字符串
... . strtoupper($config['type']); if (defined($predef)) { $this->type = constant($predef); if ($this->type == self::TYPE_ID) { $this->flag = self::FLAG_INDEX_SELF; $this->tokenizer = 'full'; } elseif ($this->type == self::TYPE_TITLE...
...hp#L221 (显示) public function __isset($name){ return method_exists($this, 'get' . $name);} 魔术方法 __isset 判断模拟属性是否存在并可读取
...(显示) public function setProject($name, $home = ''){ if ($name !== $this->_project) { $cmd = array('cmd' => XS_CMD_USE, 'buf' => $name, 'buf1' => $home); $this->execCommand($cmd, XS_CMD_OK_PROJECT); $this->_project = $name; }} 设置当前项目
...ing='第一个新增词', $ignore = true, $duality = false, $multi = 3) { this -> cws -> addDict('/res/category/dict_1.txt',SCWS_XDICT_TXT); var_dump($this -> cws ->hasWord("新增词","n")); $this -> cws -> setduality($duality); $this -> cws -> setignore($ignore); $this -> cws -> setmulti($mu...
...lass.php#L461 (显示) public function setLimit($limit, $offset = 0){ $this->_limit = intval($limit); $this->_offset = intval($offset); return $this;} 设置搜索结果的数量和偏移 用于搜索结果分页, 每次调用 search 后会还原这2个变量到初始值
...ize if ($len == 0) { return ''; } // loop to send data $this->check(); for ($buf = '', $size = $len;;) { $bytes = fread($this->_sock, $len); if ($bytes === false || strlen($bytes) == 0) { break; } $len -= strlen($bytes); $buf .= $by...