Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
factory.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Office365
;
4
5
use
Bitrix\Calendar\Core\Base\BaseException
;
6
use
Bitrix\Calendar\Sync\Connection\Connection
;
7
use
Bitrix\Calendar\Sync\Factories\FactoryBase
;
8
use
Bitrix\Calendar\Sync\Managers\EventManagerInterface
;
9
use
Bitrix\Calendar\Sync\Managers\IncomingEventManagerInterface
;
10
use
Bitrix\Calendar\Sync\Managers\IncomingSectionManagerInterface
;
11
use
Bitrix\Calendar\Sync\Managers\OutgoingEventManagerInterface
;
12
use
Bitrix\Calendar\Sync\Managers\OutgoingSectionManagerInterface
;
13
use
Bitrix\Calendar\Sync\Managers\PushManagerInterface
;
14
use
Bitrix\Calendar\Sync\Managers\SectionManagerInterface
;
15
use
Bitrix\Calendar\Sync
;
16
use
Bitrix\Calendar\Sync\Util\Context
;
17
use
Bitrix\Main\ObjectNotFoundException
;
18
use
Bitrix\Main\SystemException
;
19
use Psr\Container\NotFoundExceptionInterface;
20
21
class
Factory
extends
FactoryBase
22
{
23
protected
?
Sync\Util\Context
$context
;
24
26
private
Office365Context
$officeContext;
27
28
public
const
SERVICE_NAME
=
'office365'
;
29
31
private
EventManagerInterface
$eventManager;
33
private
SectionManagerInterface
$sectionManager;
34
43
public
function
__construct
(
Connection
$connection
, Sync\
Util
\
Context
$context
=
null
)
44
{
45
parent::__construct(
$connection
,
$context
);
46
$this->officeContext =
Office365Context::getConnectionContext
(
$connection
);
47
}
48
49
public
function
getEventManager
():
EventManagerInterface
50
{
51
if
(empty($this->eventManager))
52
{
53
$this->eventManager =
new
EventManager
($this->officeContext);
54
}
55
56
return
$this->eventManager;
57
}
58
59
public
function
getSectionManager
():
SectionManagerInterface
60
{
61
if
(empty($this->sectionManager))
62
{
63
$this->sectionManager =
new
SectionManager
($this->officeContext);
64
}
65
66
return
$this->sectionManager;
67
}
68
69
public
function
getConnection
():
Connection
70
{
71
return
$this->connection
;
72
}
73
74
public
function
getCode
(): string
75
{
76
return
$this->
getConnection
()->getVendor()->getCode();
77
}
78
79
public
function
canSubscribeSection
(): bool
80
{
81
return
true
;
82
}
83
84
public
function
getContext
(): Sync\
Util
\
Context
85
{
86
return
$this->context
;
87
}
88
89
public
function
getPushManager
(): ?
PushManagerInterface
90
{
91
return
$this->officeContext->getPushManager();
92
}
93
97
public
function
getIncomingSectionManager
():
IncomingSectionManagerInterface
98
{
99
return
$this->officeContext->getIncomingManager();
100
}
101
102
public
function
getIncomingEventManager
():
IncomingEventManagerInterface
103
{
104
return
$this->officeContext->getIncomingManager();
105
}
106
107
public
function
getOutgoingEventManager
():
OutgoingEventManagerInterface
108
{
109
return
$this->officeContext->getOutgoingEventManager();
110
}
111
117
public
function
getOutgoingSectionManager
():
OutgoingSectionManagerInterface
118
{
119
throw
new
SystemException
(
"Method "
. __METHOD__ .
" is not implemented"
);
120
// TODO: Implement getOutgoingSectionManager() method.
121
}
122
}
Bitrix\Calendar\Core\Base\BaseException
Definition
baseexception.php:8
Bitrix\Calendar\Rooms\Util
Definition
util.php:20
Bitrix\Calendar\Sync\Connection\Connection
Definition
connection.php:13
Bitrix\Calendar\Sync\Factories\FactoryBase
Definition
factorybase.php:12
Bitrix\Calendar\Sync\Factories\FactoryBase\$connection
Connection $connection
Definition
factorybase.php:22
Bitrix\Calendar\Sync\Office365\EventManager
Definition
eventmanager.php:40
Bitrix\Calendar\Sync\Office365\Factory
Definition
factory.php:22
Bitrix\Calendar\Sync\Office365\Factory\getSectionManager
getSectionManager()
Definition
factory.php:59
Bitrix\Calendar\Sync\Office365\Factory\SERVICE_NAME
const SERVICE_NAME
Definition
factory.php:28
Bitrix\Calendar\Sync\Office365\Factory\getOutgoingSectionManager
getOutgoingSectionManager()
Definition
factory.php:117
Bitrix\Calendar\Sync\Office365\Factory\getContext
getContext()
Definition
factory.php:84
Bitrix\Calendar\Sync\Office365\Factory\getIncomingSectionManager
getIncomingSectionManager()
Definition
factory.php:97
Bitrix\Calendar\Sync\Office365\Factory\getIncomingEventManager
getIncomingEventManager()
Definition
factory.php:102
Bitrix\Calendar\Sync\Office365\Factory\__construct
__construct(Connection $connection, Sync\Util\Context $context=null)
Definition
factory.php:43
Bitrix\Calendar\Sync\Office365\Factory\getPushManager
getPushManager()
Definition
factory.php:89
Bitrix\Calendar\Sync\Office365\Factory\canSubscribeSection
canSubscribeSection()
Definition
factory.php:79
Bitrix\Calendar\Sync\Office365\Factory\getEventManager
getEventManager()
Definition
factory.php:49
Bitrix\Calendar\Sync\Office365\Factory\getCode
getCode()
Definition
factory.php:74
Bitrix\Calendar\Sync\Office365\Factory\getConnection
getConnection()
Definition
factory.php:69
Bitrix\Calendar\Sync\Office365\Factory\getOutgoingEventManager
getOutgoingEventManager()
Definition
factory.php:107
Bitrix\Calendar\Sync\Office365\Factory\$context
Sync Util Context $context
Definition
factory.php:23
Bitrix\Calendar\Sync\Office365\Office365Context
Definition
office365context.php:28
Bitrix\Calendar\Sync\Office365\Office365Context\getConnectionContext
static getConnectionContext(Connection $connection)
Definition
office365context.php:62
Bitrix\Calendar\Sync\Office365\SectionManager
Definition
sectionmanager.php:37
Bitrix\Calendar\Sync\Util\Context
Definition
context.php:18
Bitrix\Main\ObjectNotFoundException
Definition
exception.php:203
Bitrix\Main\SystemException
Definition
exception.php:8
Bitrix\Calendar\Sync\Managers\EventManagerInterface
Definition
eventmanagerinterface.php:15
Bitrix\Calendar\Sync\Managers\IncomingEventManagerInterface
Definition
incomingeventmanagerinterface.php:12
Bitrix\Calendar\Sync\Managers\IncomingSectionManagerInterface
Definition
incomingsectionmanagerinterface.php:12
Bitrix\Calendar\Sync\Managers\OutgoingEventManagerInterface
Definition
outgoingeventmanagerinterface.php:8
Bitrix\Calendar\Sync\Managers\OutgoingSectionManagerInterface
Definition
outgoingsectionmanagerinterface.php:8
Bitrix\Calendar\Sync\Managers\PushManagerInterface
Definition
pushmanagerinterface.php:11
Bitrix\Calendar\Sync\Managers\SectionManagerInterface
Definition
sectionmanagerinterface.php:12
Bitrix\Calendar\Sync\Office365
Definition
abstractmanager.php:3
Bitrix\Calendar\Sync
modules
calendar
lib
sync
office365
factory.php
Создано системой
1.10.0