Search phrase prepared in a special way to search the database. It is responsible for this class Searchwords defined in the file includes/searchwords.php.
var max_length – максимальная длина слова.
array prepare (string $text) – Выделение уникальных слов из текста.
The function uses Porter stemmer.
Example:
Custom::inc('includes/searchwords.php');
$searchwords = new Searchwords();
$array = $searchwords->prepare('Не только стильный, но и достаточно удобный в эксплуатации. Его основной объем и два больших боковых кармана на молнии, вместят все необходимое для рыбной ловли или охоты.');
print_r($array);
/* выведет:
Array
(
[0] => только
[1] => стильн
[2] => достаточно
[3] => удобн
[4] => эксплуатац
[5] => его
[6] => основн
[7] => объ
[8] => дв
[9] => больших
[10] => боковых
[11] => карма
[12] => молн
[13] => вместят
[14] => вс
[15] => необходим
[16] => дл
[17] => рыбн
[18] => ловл
[19] => ил
[20] => охот
)
*/
Methods with the same name as their class will not be constructors in a future version of PHP; Markdown_Parser has a deprecated constructor #1 include_once() called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:499] #2 Docs_model->prepare_text( Search phrase prepared in a special way to search the database. It is responsible for this class *Searchwords* defined in the file *includes/searchwords.php*. <insert name="show_func" ...) called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:94] #3 Docs_model->show() called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.php:29] #4 Docs->init() called at [/var/www/diafan/data/www/diafancms.com/includes/init.php:474] #5 Init->module() called at [/var/www/diafan/data/www/diafancms.com/includes/init.php:119] #6 Init->start() called at [/var/www/diafan/data/www/diafancms.com/index.php:62] | /var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:499 |