__get() 方法 public mixed __get(string $name) $name string 属性名称 {return} mixed 属性值 源码: sdk/php/lib/XS.class.php#L182 (显示) public function __get($name){ $getter = 'get' . $name; if (method_exists($this, $getter)) { return $this->$getter...
__get() 方法 public mixed __get(string $name) $name string 字段名称 {return} mixed 字段值, 若不存在返回 null 源码: sdk/php/lib/XSDocument.class.php#L79 (显示) public function __get($name){ if (!isset($this->_data[$name])) { return null; } ...
...性名称不区分大小写. 例: $a = $obj->text; // $a 值等于 $obj->getText() 的返回值 $obj->text = $a; // 等同事调用 $obj->setText($a) Public 方法 隐去继承来的方法 名称描述定义于 __get() 魔术方法 __get XSComponent __isset() 魔...
...n connect($param){ $host = isset($param['host']) ? $param['host'] : ini_get('mysqli.default_host'); $user = isset($param['user']) ? $param['user'] : ini_get('mysqli.default_user'); $pass = isset($param['pass']) ? $param['pass'] : ini_get('mysqli.default_pw'); $port = isset($param['port']...
...n connect($param){ $host = isset($param['host']) ? $param['host'] : ini_get('mysql.default_host'); $host .= (isset($param['port']) && $param['port'] != 3306) ? ':' . $param['port'] : ''; $user = isset($param['user']) ? $param['user'] : ini_get('mysql.default_user'); $pass = isset($param[...
getVersion() 方法 public string getVersion() {return} string 版本号 源码: sdk/php/lib/XSTokenizer.class.php#L327 (显示) public function getVersion(){ $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_VERSION); $res = self::$_server->execCommand($cmd, XS_...
getScwsMulti() 方法 (自版本 v1.4.7 起可用) public int getScwsMulti() {return} int 返回当前库的分词复合等级 源码: sdk/php/lib/XSIndex.class.php#L347 (显示) public function getScwsMulti(){ $cmd = array('cmd' => XS_CMD_SEARCH_SCWS_GET, 'arg1' => XS_CMD_SCW...
...n connect($param){ $host = isset($param['host']) ? $param['host'] : ini_get('mysqli.default_host'); $user = isset($param['user']) ? $param['user'] : ini_get('mysqli.default_user'); $pass = isset($param['pass']) ? $param['pass'] : ini_get('mysqli.default_pw'); $port = isset($param['port']...
...setter($value); } // throw exception $msg = method_exists($this, 'get' . $name) ? 'Read-only' : 'Undefined'; $msg .= ' property: ' . get_class($this) . '::$' . $name; throw new XSException($msg);} 魔术方法 __set 设置模拟属性的值, 内部实际是调用 setXxx 方法
...n connect($param){ $host = isset($param['host']) ? $param['host'] : ini_get('mysql.default_host'); $host .= (isset($param['port']) && $param['port'] != 3306) ? ':' . $param['port'] : ''; $user = isset($param['user']) ? $param['user'] : ini_get('mysql.default_user'); $pass = isset($param[...