Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
parameter.php
1
<?php
2
3
4
namespace
Bitrix\Calendar\ICal\Basic
;
5
6
7
class
Parameter
8
{
9
private
$name;
10
private
$value;
11
private
$disableEscaping;
12
13
public
static
function
getInstance
(
string
$name,
string
$value, $disableEscaping =
false
):
Parameter
14
{
15
return
new
self
($name, $value, $disableEscaping);
16
}
17
18
public
function
__construct
(
string
$name,
string
$value, $disableEscaping =
false
)
19
{
20
$this->name = $name;
21
22
$this->value = $value;
23
$this->disableEscaping = $disableEscaping;
24
}
25
26
public
function
getName
(): string
27
{
28
return
$this->name;
29
}
30
31
public
function
getValue
(): string
32
{
33
if
($this->disableEscaping) {
34
return
$this->value;
35
}
36
37
$replacements = [
38
'\\'
=>
'\\\\'
,
39
'"'
=>
'\\"'
,
40
','
=>
'\\,'
,
41
';'
=>
'\\;'
,
42
"\n"
=>
'\\n'
,
43
];
44
45
return
str_replace(array_keys($replacements), $replacements, $this->value);
46
}
47
}
Bitrix\Calendar\ICal\Basic\Parameter
Definition
parameter.php:8
Bitrix\Calendar\ICal\Basic\Parameter\getName
getName()
Definition
parameter.php:26
Bitrix\Calendar\ICal\Basic\Parameter\getInstance
static getInstance(string $name, string $value, $disableEscaping=false)
Definition
parameter.php:13
Bitrix\Calendar\ICal\Basic\Parameter\getValue
getValue()
Definition
parameter.php:31
Bitrix\Calendar\ICal\Basic\Parameter\__construct
__construct(string $name, string $value, $disableEscaping=false)
Definition
parameter.php:18
Bitrix\Calendar\ICal\Basic
Definition
attachmentmanager.php:4
modules
calendar
lib
ical
basic
parameter.php
Создано системой
1.10.0