Файловый менеджер - Редактировать - /var/www/axolotl/data/www/axolotls.ru/www/bitrix/modules/sale/lib/location/normalizer/commonnormalizer.php
Назад
<? namespace Bitrix\Sale\Location\Normalizer; use \Bitrix\Main\Text\Encoding; /** * Class CommonNormalizer * @package Bitrix\Sale\Location\Normalizer * Delete all except letters and spaces, trim and converts to uppercase. */ class CommonNormalizer implements INormalizer { /** * @inheritdoc */ public function normalize($string) { $result = $string; // todo: \w on non-utf-8 sites if(strtolower(SITE_CHARSET) != 'utf-8') { $result = Encoding::convertEncoding($result, SITE_CHARSET, 'utf-8'); } $result = preg_replace('/([^\w\s]|_)/iu', ' ', $result); if(strtolower(SITE_CHARSET) != 'utf-8') { $result = Encoding::convertEncoding($result, 'utf-8', SITE_CHARSET); } $result = preg_replace('/\s+/i'.BX_UTF_PCRE_MODIFIER, ' ', $result); $result = trim($result); $result = ToUpper($result); return $result; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.8 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка