The Full Text Search permit to found some data in a database based on a user query (like the search engines in the web).
$fts = new Domframework\Fts ();
$res = $fts->search ("\"ABC KLM\" XYZ");Namespace Domframework
/** The Full Text Search Analyze the provided search text (like a search engine), and create the sql query to found the answer. It also allow to check if a sentence is valid against a searched text Manage the sentences (enclosed in quotes), or the standalone words, Manage the non wanted field (beginning by -), Do not search if the word is smaller than a parameter. Each sentence or word can be modified by external methods separately
/** The minimum length of a token to search
/** The constructor check the availability of the MB module
/** Set the method to call on tokens sentence only The method must return the token updated@param callable $callableThe callable method@return$this
/** Set the method to call on tokens word only The method must return the token updated@param callable $callableThe callable method@return$this
/**
 Construct the query based on the tokens.
 The tokens can be updated by methods so the query may be modified by the
 external methods
 @return string
/** Get the regexes defined after the analyzer
/** Get the tokens store after the search
/** Get the tokens store after the search, without the too small ones
/** Explode the query text provided in $query, to be used to search in database, file...@param string $queryThe text to found in the database@returnarray The operator and the associated regex value to search
/** Search in SQL@param string $queryThe text to found in the database@param object $dblayerooThe dblayeroo object to query@param array|null $fieldsThe fields in $dblayeroo to look for data. If null, look in all the fields defined in the dblayeroo object@returnarray The result of the query
/** Return $line if the $query match against $line, or false if not@param string $lineThe line to examine@param string $queryThe query to apply on it@returnstring|false The $line if match, false