Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
factory.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Google
;
4
5
use
Bitrix\Calendar\Sync
;
6
use
Bitrix\Calendar\Sync\Connection\Connection
;
7
use
Bitrix\Calendar\Sync\Managers\IncomingEventManagerInterface
;
8
use
Bitrix\Calendar\Sync\Managers\IncomingSectionManagerInterface
;
9
use
Bitrix\Calendar\Sync\Managers\OutgoingEventManagerInterface
;
10
use
Bitrix\Calendar\Sync\Managers\OutgoingSectionManagerInterface
;
11
use
Bitrix\Calendar\Sync\Managers\PushManagerInterface
;
12
use
Bitrix\Calendar\Sync\Util\Context
;
13
14
class
Factory
extends
Sync\Factories\FactoryBase
15
{
16
public
const
SERVICE_NAME
=
'google_api_oauth'
;
17
18
public
function
getEventManager
(): Sync\Managers\
EventManagerInterface
19
{
20
return
new
EventManager
($this->
getConnection
(), $this->
getConnection
()->getOwner()->getId());
21
}
22
23
public
function
getSectionManager
(): Sync\Managers\
SectionManagerInterface
24
{
25
return
new
SectionManager
($this->
getConnection
(), $this->
getConnection
()->getOwner()->getId());
26
}
27
28
public
function
getConnection
():
Connection
29
{
30
return
$this->connection;
31
}
32
33
public
function
getCode
(): string
34
{
35
return
self::SERVICE_NAME;
36
}
37
38
public
function
getContext
():
Context
39
{
40
return
$this->context;
41
}
42
43
public
function
getImportManager
(): Sync\Managers\
IncomingSectionManagerInterface
44
{
45
return
new
ImportManager
($this->
getConnection
(), $this->
getConnection
()->getOwner()->getId());
46
}
47
48
public
function
canSubscribeSection
(): bool
49
{
50
return
true
;
51
}
52
53
public
function
canSubscribeConnection
(): bool
54
{
55
return
true
;
56
}
57
58
public
function
getPushManager
(): ?
PushManagerInterface
59
{
60
// TODO: check, that owner is user
61
return
new
PushManager
($this->connection, $this->connection->getOwner()->getId());
62
}
63
64
public
function
getIncomingSectionManager
():
IncomingSectionManagerInterface
65
{
66
return
new
ImportManager
($this->
getConnection
(), $this->
getConnection
()->getOwner()->getId());
67
}
68
69
public
function
getIncomingEventManager
():
IncomingEventManagerInterface
70
{
71
return
new
ImportManager
($this->
getConnection
(), $this->
getConnection
()->getOwner()->getId());
72
}
73
74
public
function
getOutgoingEventManager
():
OutgoingEventManagerInterface
75
{
76
return
new
OutgoingEventManager
($this->
getConnection
(), $this->
getConnection
()->getOwner()->getId());
77
}
78
79
public
function
getOutgoingSectionManager
():
OutgoingSectionManagerInterface
80
{
81
return
new
OutgoingSectionManager
($this->
getConnection
(), $this->
getConnection
()->getOwner()->getId());
82
}
83
}
Bitrix\Calendar\Core\Mappers\Connection
Definition
connection.php:23
Bitrix\Calendar\Core\Mappers\Factory
Definition
factory.php:6
Bitrix\Calendar\Core\Mappers\Factory\getConnection
getConnection()
Definition
factory.php:66
Bitrix\Calendar\Sync\Connection\Connection
Definition
connection.php:13
Bitrix\Calendar\Sync\Factories\FactoryBase
Definition
factorybase.php:12
Bitrix\Calendar\Sync\Google\EventManager
Definition
eventmanager.php:29
Bitrix\Calendar\Sync\Google\Factory\getImportManager
getImportManager()
Definition
factory.php:43
Bitrix\Calendar\Sync\Google\Factory\getSectionManager
getSectionManager()
Definition
factory.php:23
Bitrix\Calendar\Sync\Google\Factory\canSubscribeConnection
canSubscribeConnection()
Definition
factory.php:53
Bitrix\Calendar\Sync\Google\Factory\SERVICE_NAME
const SERVICE_NAME
Definition
factory.php:16
Bitrix\Calendar\Sync\Google\Factory\getOutgoingSectionManager
getOutgoingSectionManager()
Definition
factory.php:79
Bitrix\Calendar\Sync\Google\Factory\getContext
getContext()
Definition
factory.php:38
Bitrix\Calendar\Sync\Google\Factory\getIncomingSectionManager
getIncomingSectionManager()
Definition
factory.php:64
Bitrix\Calendar\Sync\Google\Factory\getIncomingEventManager
getIncomingEventManager()
Definition
factory.php:69
Bitrix\Calendar\Sync\Google\Factory\getPushManager
getPushManager()
Definition
factory.php:58
Bitrix\Calendar\Sync\Google\Factory\canSubscribeSection
canSubscribeSection()
Definition
factory.php:48
Bitrix\Calendar\Sync\Google\Factory\getEventManager
getEventManager()
Definition
factory.php:18
Bitrix\Calendar\Sync\Google\Factory\getCode
getCode()
Definition
factory.php:33
Bitrix\Calendar\Sync\Google\Factory\getConnection
getConnection()
Definition
factory.php:28
Bitrix\Calendar\Sync\Google\Factory\getOutgoingEventManager
getOutgoingEventManager()
Definition
factory.php:74
Bitrix\Calendar\Sync\Google\ImportManager
Definition
importmanager.php:23
Bitrix\Calendar\Sync\Google\OutgoingEventManager
Definition
outgoingeventmanager.php:30
Bitrix\Calendar\Sync\Google\OutgoingSectionManager
Definition
outgoingsectionmanager.php:9
Bitrix\Calendar\Sync\Google\PushManager
Definition
pushmanager.php:21
Bitrix\Calendar\Sync\Google\SectionManager
Definition
sectionmanager.php:19
Bitrix\Calendar\Sync\Util\Context
Definition
context.php:18
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\Google
Bitrix\Calendar\Sync
modules
calendar
lib
sync
google
factory.php
Создано системой
1.10.0