Interface cebe\jssearch\TokenizerInterface

Implemented bycebe\jssearch\tokenizer\StandardTokenizer

Interface for all Tokenizers.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
tokenize() Tokenizes a string and returns an array of the following format: cebe\jssearch\TokenizerInterface
tokenizeJs() Returns a javascript equivalent of tokenize() that will be used on client side to tokenize the search query. cebe\jssearch\TokenizerInterface

Method Details

tokenize() public abstract method

Tokenizes a string and returns an array of the following format:

[['word', 2], ['other', 1]]

where the first part is the token string and the second is a weight value.

public abstract array tokenize ( $string )
$string string

The string to tokenize

tokenizeJs() public abstract method

Returns a javascript equivalent of tokenize() that will be used on client side to tokenize the search query.

public abstract string tokenizeJs ( )