Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
converter.php
1
<?php
2
namespace
Bitrix\Main\Text
;
3
4
abstract
class
Converter
5
{
6
const
TEXT
=
"text"
;
7
const
HTML
=
"html"
;
8
9
private
static
$htmlConverter;
10
private
static
$xmlConverter;
11
private
static
$emptyConverter;
12
13
public
static
function
getHtmlConverter
()
14
{
15
if
(self::$htmlConverter ==
null
)
16
self::$htmlConverter =
new
HtmlConverter
();
17
return
self::$htmlConverter;
18
}
19
20
public
static
function
getXmlConverter
()
21
{
22
if
(self::$xmlConverter ==
null
)
23
self::$xmlConverter =
new
XmlConverter
();
24
return
self::$xmlConverter;
25
}
26
27
public
static
function
getEmptyConverter
()
28
{
29
if
(self::$emptyConverter ==
null
)
30
self::$emptyConverter =
new
EmptyConverter
();
31
return
self::$emptyConverter;
32
}
33
34
public
static
function
initTextType
($textType)
35
{
36
$textType = mb_strtolower($textType);
37
if
($textType != self::TEXT && $textType != self::HTML)
38
$textType =
self::TEXT
;
39
return
$textType;
40
}
41
42
abstract
public
function
encode
($text, $textType =
""
);
43
abstract
public
function
decode
($text, $textType =
""
);
44
}
Bitrix\Main\Text\Converter
Definition
converter.php:5
Bitrix\Main\Text\Converter\TEXT
const TEXT
Definition
converter.php:6
Bitrix\Main\Text\Converter\getHtmlConverter
static getHtmlConverter()
Definition
converter.php:13
Bitrix\Main\Text\Converter\getXmlConverter
static getXmlConverter()
Definition
converter.php:20
Bitrix\Main\Text\Converter\initTextType
static initTextType($textType)
Definition
converter.php:34
Bitrix\Main\Text\Converter\encode
encode($text, $textType="")
Bitrix\Main\Text\Converter\HTML
const HTML
Definition
converter.php:7
Bitrix\Main\Text\Converter\decode
decode($text, $textType="")
Bitrix\Main\Text\Converter\getEmptyConverter
static getEmptyConverter()
Definition
converter.php:27
Bitrix\Main\Text\EmptyConverter
Definition
emptyconverter.php:6
Bitrix\Main\Text\HtmlConverter
Definition
htmlconverter.php:5
Bitrix\Main\Text\XmlConverter
Definition
xmlconverter.php:5
Bitrix\Main\Text
Definition
base32.php:2
modules
main
lib
text
converter.php
Создано системой
1.10.0