1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
content.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main\Search
;
4
5
use
Bitrix\Main\ORM\Query\Filter
;
6
7
class
Content
8
{
9
const
TYPE_STRING
= 1;
10
const
TYPE_INTEGER
= 2;
11
const
TYPE_MIXED
= 3;
12
18
public
static
function
prepareStringToken
($token)
19
{
20
return
str_rot13($token);
21
}
22
28
public
static
function
prepareIntegerToken
($token)
29
{
30
$token = intval($token);
31
return
str_pad($token,
Filter
\Helper::getMinTokenSize(),
'0'
, STR_PAD_LEFT);
32
}
33
39
public
static
function
isIntegerToken
($token)
40
{
41
return
preg_match(
'/^[0-9]{1,}$/i'
, $token);
42
}
43
50
public
static
function
canUseFulltextSearch
($token,
$type
= self::TYPE_STRING)
51
{
52
if
((
int
)
$type
> 1)
53
{
54
$result
= static::isIntegerToken($token) || mb_strlen($token) >= Filter\Helper::getMinTokenSize();
55
}
56
else
57
{
58
$result
= mb_strlen($token) >= Filter\Helper::getMinTokenSize();
59
}
60
61
return
$result
;
62
}
63
}
$type
$type
Определения
options.php:106
Bitrix\Main\Search\Content
Определения
content.php:8
Bitrix\Main\Search\Content\canUseFulltextSearch
static canUseFulltextSearch($token, $type=self::TYPE_STRING)
Определения
content.php:50
Bitrix\Main\Search\Content\prepareIntegerToken
static prepareIntegerToken($token)
Определения
content.php:28
Bitrix\Main\Search\Content\TYPE_MIXED
const TYPE_MIXED
Определения
content.php:11
Bitrix\Main\Search\Content\isIntegerToken
static isIntegerToken($token)
Определения
content.php:39
Bitrix\Main\Search\Content\TYPE_STRING
const TYPE_STRING
Определения
content.php:9
Bitrix\Main\Search\Content\prepareStringToken
static prepareStringToken($token)
Определения
content.php:18
Bitrix\Main\Search\Content\TYPE_INTEGER
const TYPE_INTEGER
Определения
content.php:10
$result
$result
Определения
get_property_values.php:14
Bitrix\Main\Filter
Bitrix\Main\ORM\Query\Filter
Определения
condition.php:9
Bitrix\Main\Search
Определения
content.php:3
bitrix
modules
main
lib
search
content.php
Создано системой
1.14.0