Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
abstractmanager.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Icloud
;
4
5
use
Bitrix\Calendar\Sync\Connection\Connection
;
6
use
Bitrix\Calendar\Sync\Connection\Server
;
7
use
Bitrix\Calendar\Sync\Managers\ServiceBase
;
8
9
abstract
class
AbstractManager
extends
ServiceBase
10
{
11
protected
int
$userId
;
12
protected
?
ApiService
$apiService
=
null
;
13
20
public
function
__construct
(
Connection
$connection
,
int
$userId
)
21
{
22
parent::__construct(
$connection
);
23
$this->userId =
$userId
;
24
$this->apiService = $this->
prepareApiService
($connection);
25
}
26
33
protected
function
prepareApiService
(
Connection
$connection
):
ApiService
34
{
35
$server = $this->
prepareServerData
($connection->getServer());
36
37
return
new
ApiService
($server, $this->userId);
38
}
39
43
protected
function
initServiceName
(): string
44
{
45
return
Helper::ACCOUNT_TYPE
;
46
}
47
53
protected
function
prepareServerData
(
Server
$server): array
54
{
55
return
[
56
'SERVER_SCHEME'
=> $server->
getScheme
(),
57
'SERVER_HOST'
=> $server->
getHost
(),
58
'SERVER_PORT'
=> $server->
getPort
(),
59
'SERVER_USERNAME'
=> $server->
getUserName
(),
60
'SERVER_PASSWORD'
=> $server->
getPassword
(),
61
];
62
}
63
}
Bitrix\Calendar\Core\Mappers\Connection
Definition
connection.php:23
Bitrix\Calendar\Sync\Connection\Connection
Definition
connection.php:13
Bitrix\Calendar\Sync\Connection\Server
Definition
server.php:6
Bitrix\Calendar\Sync\Connection\Server\getPassword
getPassword()
Definition
server.php:71
Bitrix\Calendar\Sync\Connection\Server\getHost
getHost()
Definition
server.php:46
Bitrix\Calendar\Sync\Connection\Server\getScheme
getScheme()
Definition
server.php:51
Bitrix\Calendar\Sync\Connection\Server\getUserName
getUserName()
Definition
server.php:66
Bitrix\Calendar\Sync\Connection\Server\getPort
getPort()
Definition
server.php:56
Bitrix\Calendar\Sync\Icloud\AbstractManager
Definition
abstractmanager.php:10
Bitrix\Calendar\Sync\Icloud\AbstractManager\__construct
__construct(Connection $connection, int $userId)
Definition
abstractmanager.php:20
Bitrix\Calendar\Sync\Icloud\AbstractManager\prepareApiService
prepareApiService(Connection $connection)
Definition
abstractmanager.php:33
Bitrix\Calendar\Sync\Icloud\AbstractManager\$userId
int $userId
Definition
abstractmanager.php:11
Bitrix\Calendar\Sync\Icloud\AbstractManager\initServiceName
initServiceName()
Definition
abstractmanager.php:43
Bitrix\Calendar\Sync\Icloud\AbstractManager\$apiService
ApiService $apiService
Definition
abstractmanager.php:12
Bitrix\Calendar\Sync\Icloud\AbstractManager\prepareServerData
prepareServerData(Server $server)
Definition
abstractmanager.php:53
Bitrix\Calendar\Sync\Icloud\ApiService
Definition
apiservice.php:16
Bitrix\Calendar\Sync\Icloud\Helper\ACCOUNT_TYPE
const ACCOUNT_TYPE
Definition
helper.php:8
Bitrix\Calendar\Sync\Managers\ServiceBase
Definition
servicebase.php:9
Bitrix\Calendar\Sync\Managers\ServiceBase\$connection
Connection $connection
Definition
servicebase.php:13
Bitrix\Calendar\Sync\Icloud
Definition
abstractmanager.php:3
modules
calendar
lib
sync
icloud
abstractmanager.php
Создано системой
1.10.0