...型为 BODY 的字段 源码: sdk/php/lib/XSFieldScheme.class.php#L77 (显示) public function getFieldBody(){ if (isset($this->_typeMap[XSFieldMeta::TYPE_BODY])) { $name = $this->_typeMap[XSFieldMeta::TYPE_BODY]; return $this->_fields[$name]; } return false;} 获取...
...字段各项配置 源码: sdk/php/lib/XSFieldScheme.class.php#L298 (显示) public function __construct($name, $config = null){ $this->name = strval($name); if (is_array($config)) { $this->fromConfig($config); }} 构造函数 __toString() 方法 public string __to...
...搜索词组成的数组 源码: sdk/php/lib/XSSearch.class.php#L707 (显示) public function getRelatedQuery($query = null, $limit = 6){ $ret = array(); $limit = max(1, min(20, intval($limit))); // Simple to disable query with field filter if ($query === null) { $query = $th...
..., 不是返回 false 源码: sdk/php/lib/XSFieldScheme.class.php#L367 (显示) public function isSpeical(){ return ($this->type == self::TYPE_ID || $this->type == self::TYPE_TITLE || $this->type == self::TYPE_BODY);} 判断当前字段是否为特殊类型 特殊类型的字段是指 id,...
...lic void __toString() 源码: sdk/php/lib/XSFieldScheme.class.php#L33 (显示) public function __toString(){ $str = ''; foreach ($this->_fields as $field) { $str .= $field->toConfig() . "\n"; } return $str;} 将对象转换为配置文件字符串 addField() 方法 ...
...置文件字符串 源码: sdk/php/lib/XSFieldScheme.class.php#L452 (显示) public function toConfig(){ // type $str = "[" . $this->name . "]\n"; if ($this->type === self::TYPE_NUMERIC) { $str .= "type = numeric\n"; } elseif ($this->type === self::TYPE_DATE) { $str .=...
...数为值的关联数组 源码: sdk/php/lib/XSSearch.class.php#L673 (显示) public function getHotQuery($limit = 6, $type = 'total'){ $ret = array(); $limit = max(1, min(50, intval($limit))); // query from log_db $this->xs->setScheme(XSFieldScheme::logger()); try { $this...
...日志字段方案 源码: sdk/php/lib/XSFieldScheme.class.php#L198 (显示) public static function logger(){ if (self::$_logger === null) { $scheme = new self; $scheme->addField('id', array('type' => 'id')); $scheme->addField('pinyin'); $scheme->addField('partial...
getFieldBody() 方法 public XSFieldMeta getFieldBody() {return} XSFieldMeta 类型为 BODY 的字段 源码: sdk/php/lib/XS.class.php#L501 (显示) public function getFieldBody(){ return $this->_scheme->getFieldBody();} 获取当前内容字段
...配置属性数组 源码: sdk/php/lib/XSFieldScheme.class.php#L514 (显示) public function fromConfig($config){ // type & default setting if (isset($config['type'])) { $predef = 'self::TYPE_' . strtoupper($config['type']); if (defined($predef)) { $this->type = c...