write() 方法 protected void write(string $buf, string $len=0) $buf string 要写入的字符串 $len string 要写入的长度, 默认为字符串长度 源码: sdk/php/lib/XSServer.class.php#L368 (显示) protected function write($buf, $len = 0){ // quick return for...
...t = intval($conn); } elseif (!strncmp($conn, 'file://', 7)) { // write-only for saving index exchangable data to file // NOTE: this will cause file content be turncated $conn = substr($conn, 7); if (($sock = @fopen($conn, 'wb')) === false) { throw new XSExce...
... instanceof XSCommand) { $cmd = new XSCommand($cmd); } $this->write(strval($cmd));} 往服务器直接发送指令 (无缓存)
...ct() 连接服务端 XSServer read() 读取数据 XSServer write() 写入数据 XSServer 属性明细 _conn 属性 protected $_conn; _flag 属性 protected $_flag; _project 属性 protected $_project; _sendBuffer 属性 protected $_sendBuffer...
...N)) { if (!$ioerr && $this->_sendBuffer !== '') { $this->write($this->_sendBuffer); $this->_sendBuffer = ''; } if (!$ioerr && !($this->_flag & self::FILE)) { $cmd = new XSCommand(XS_CMD_QUIT); fwrite($this->_sock, $cmd); } ...
... } // throw exception $msg = method_exists($this, 'set' . $name) ? 'Write-only' : 'Undefined'; $msg .= ' property: ' . get_class($this) . '::$' . $name; throw new XSException($msg);} 魔术方法 __get 取得模拟属性的值, 内部实际调用 getXxx 方法的返回值
... $buf = $this->_sendBuffer . $cmd; $this->_sendBuffer = ''; $this->write($buf); // return true directly for local file if ($this->_flag & self::FILE) { return true; } // got the respond $res = $this->getRespond(); // check respond if ($res->cmd === XS_CMD_ERR && $...
... } // throw exception $msg = method_exists($this, 'set' . $name) ? 'Write-only' : 'Undefined'; $msg .= ' property: ' . get_class($this) . '::$' . $name; throw new XSException($msg);} 魔术方法 __get 取得模拟属性的值, 内部实际调用 getXxx 方法的返回值 __isset...
...ct() 连接服务端 XSServer read() 读取数据 XSServer write() 写入数据 XSServer 属性明细 customDict 属性 public string getCustomDict()public void setCustomDict(string $content) 获取自定义词典内容 scwsMulti 属性 (自版本 v1.4.7 起可用...
...ct() 连接服务端 XSServer read() 读取数据 XSServer write() 写入数据 XSServer 属性明细 allSynonyms 属性 只读 (自版本 v1.3.0 起可用) public array getAllSynonyms(int $limit=0, int $offset=0, bool $stemmed=false) 获取当前库内的全部同...