Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
inboxattachmentmanager.php
1
<?php
2
3
4
namespace
Bitrix\Calendar\ICal\MailInvitation
;
5
6
7
use
Bitrix\Calendar\ICal\Parser\Calendar
;
8
use
Bitrix\Calendar\ICal\Parser\IcalParserException
;
9
use
Bitrix\Calendar\ICal\Parser\Parser
;
10
11
class
InboxAttachmentManager
12
{
16
private
$fileContent;
17
21
private
$parser;
22
27
public
static
function
createInstance
(
string
$fileContent):
InboxAttachmentManager
28
{
29
return
new
self
($fileContent);
30
}
31
36
public
function
__construct
(
string
$fileContent)
37
{
38
$this->fileContent = $fileContent;
39
}
40
44
public
function
parse
():
InboxAttachmentManager
45
{
46
try
47
{
48
$this->parser =
Parser::createInstance
($this->fileContent)
49
->
parse
();
50
}
51
catch
(
IcalParserException
$e)
52
{
53
$this->parser =
null
;
54
}
55
56
return
$this;
57
}
58
62
public
function
getComponent
(): ?
Calendar
63
{
64
if
(empty($this->parser))
65
{
66
return
null
;
67
}
68
69
return
$this->parser->getCalendarComponent();
70
}
71
}
Bitrix\Calendar\ICal\Builder\Calendar
Definition
calendar.php:13
Bitrix\Calendar\ICal\MailInvitation\InboxAttachmentManager
Definition
inboxattachmentmanager.php:12
Bitrix\Calendar\ICal\MailInvitation\InboxAttachmentManager\getComponent
getComponent()
Definition
inboxattachmentmanager.php:62
Bitrix\Calendar\ICal\MailInvitation\InboxAttachmentManager\parse
parse()
Definition
inboxattachmentmanager.php:44
Bitrix\Calendar\ICal\MailInvitation\InboxAttachmentManager\createInstance
static createInstance(string $fileContent)
Definition
inboxattachmentmanager.php:27
Bitrix\Calendar\ICal\MailInvitation\InboxAttachmentManager\__construct
__construct(string $fileContent)
Definition
inboxattachmentmanager.php:36
Bitrix\Calendar\ICal\Parser\Calendar
Definition
calendar.php:8
Bitrix\Calendar\ICal\Parser\IcalParserException
Definition
icalparserexception.php:8
Bitrix\Calendar\ICal\Parser\Parser
Definition
parser.php:10
Bitrix\Calendar\ICal\Parser\Parser\createInstance
static createInstance(string $content)
Definition
parser.php:28
Bitrix\Calendar\ICal\MailInvitation
Definition
attachmentcancelmanager.php:4
modules
calendar
lib
ical
mailinvitation
inboxattachmentmanager.php
Создано системой
1.10.0