fromConfig() 方法 public void fromConfig(array $config) $config array 原始配置属性数组 源码: sdk/php/lib/XSFieldScheme.class.php#L514 (显示) public function fromConfig($config){ // type & default setting if (isset($config['type'])) { $predef = 'self::TY...
config 属性 只读 public array getConfig() 获取配置原始数据
__construct() 方法 public void __construct(string $name, array $config=NULL) $name string 字段名称 $config array 可选参数, 初始化字段各项配置 源码: sdk/php/lib/XSFieldScheme.class.php#L298 (显示) public function __construct($name, $config = null){ ...
addField() 方法 public void addField(mixed $field, array $config=NULL) $field mixed 若类型为 XSFieldMeta 表示要添加的字段对象, 若类型为 string 表示字段名称, 连同 $config 参数一起创建字段对象 $config array 当 $field 参数为 strin...
...dMeta __toString() 将对象转换为字符串 XSFieldMeta fromConfig() 解析字段对象属性 XSFieldMeta getCustomTokenizer() 获取自定义词法分析器 XSFieldMeta hasCustomTokenizer() 判断当前字段是否采用自定义分词器 XSFieldMeta hasIndex(...
...387 (显示) public function getDefaultCharset(){ return isset($this->_config['project.default_charset']) ? strtoupper($this->_config['project.default_charset']) : 'UTF-8';} 获取项目的默认字符集
...ScwsServer(){ 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 分词连接
... allFields XSFieldMeta[] 获取项目所有字段结构设置 XS config array 获取配置原始数据 XS defaultCharset string 获取项目的默认字符集 XS fieldBody XSFieldMeta 获取当前内容字段 XS fieldId XSFieldMeta 获取当前主键字段...
...s->_index === null) { $adds = array(); $conn = isset($this->_config['server.index']) ? $this->_config['server.index'] : 8383; if (($pos = strpos($conn, ';')) !== false) { $adds = explode(';', substr($conn, $pos + 1)); $conn = substr($conn, 0, $pos); ...
...is->_search === null) { $conns = array(); if (!isset($this->_config['server.search'])) { $conns[] = 8384; } else { foreach (explode(';', $this->_config['server.search']) as $conn) { $conn = trim($conn); if ($conn !== '') { ...