XSTokenizerSplit
| 包 | XS.tokenizer |
|---|---|
| 继承关系 | class XSTokenizerSplit |
| 实现接口 | XSTokenizer |
| 版本 | 1.0.0 |
| 源代码 | sdk/php/lib/XSTokenizer.class.php |
内置的分割分词器
方法明细
__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;
}
getTokens()
方法
|
public void getTokens($value, $doc=NULL)
| ||
| $value | ||
| $doc | ||
源码: sdk/php/lib/XSTokenizer.class.php#L85 (显示)
public function getTokens($value, XSDocument $doc = null)
{
if (strlen($this->arg) > 2 && substr($this->arg, 0, 1) == '/' && substr($this->arg, -1, 1) == '/')
return preg_split($this->arg, $value);
return explode($this->arg, $value);
}