$trie_array
$trie_array : array
A nested array used to represent the trie
Implements a trie data structure which can be used to store terms read from a dictionary in a succinct way
add(string $term, boolean $raw_url_decode = true) : array
Adds a term to the Trie
string | $term | the term to be inserted if a space separated term value pair. Then the term is inserted into the trie and the leaf label is the value. |
boolean | $raw_url_decode | decide term should be encoded in utf-8 or url |
$trie_array beneath last letter of term inserted
getValuesTrieArray(array $trie_array, string $prefix, integer $max_results, integer $count, boolean $find_more = true) : array
Computes the suffixes $count,.
..$max_results-$count in the trie_array beneath the provided $find_more is true. Prepends $prefix to each and returns the array of the result.
array | $trie_array | a nested array representing a trie to look up suffixes in |
string | $prefix | to prepend to each found suffix |
integer | $max_results | maximum number of strings to return |
integer | $count | which suffix in trie_array to start with |
boolean | $find_more | whether to try to look up or not (stops recursion) |
$terms a list of ($prefix.suffix1, $prefix, $suffix2,...)