Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
builderconnectionfromexternaldata.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Google\Builders
;
4
5
use
Bitrix\Calendar\Core\Builders\Builder
;
6
use
Bitrix\Calendar\Core\Role\Role
;
7
use
Bitrix\Calendar\Sync\Connection\Connection
;
8
use
Bitrix\Calendar\Sync\Google\Factory
;
9
use
Bitrix\Calendar\Sync\Google\Helper
;
10
use
Bitrix\Calendar\Sync\Vendor\Vendor
;
11
12
class
BuilderConnectionFromExternalData
implements
Builder
13
{
14
private
Role
$owner;
15
16
public
function
__construct
(
Role
$user)
17
{
18
$this->owner = $user;
19
}
20
25
public
function
build
():
Connection
26
{
27
return
(
new
Connection
())
28
->setVendor(
new
Vendor
([
29
'SERVER_SCHEME'
=>
Helper::HTTP_SCHEME_DEFAULT
,
30
'SERVER_HOST'
=>
Helper::GOOGLE_API_URL
,
31
'SERVER_PORT'
=>
Helper::DEFAULT_HTTPS_PORT
,
32
'SERVER_PATH'
=>
Helper::GOOGLE_API_V3_URI
,
33
'SERVER_USERNAME'
=>
null
,
34
'SERVER_PASSWORD'
=>
null
,
35
'ACCOUNT_TYPE'
=>
Factory::SERVICE_NAME
,
36
]))
37
->setDeleted(
false
)
38
->setOwner($this->owner)
39
;
40
}
41
}
Bitrix\Calendar\Core\Mappers\Connection
Definition
connection.php:23
Bitrix\Calendar\Core\Mappers\Factory
Definition
factory.php:6
Bitrix\Calendar\Core\Role\Helper
Definition
helper.php:10
Bitrix\Calendar\Core\Role\Role
Definition
role.php:8
Bitrix\Calendar\Sync\Connection\Connection
Definition
connection.php:13
Bitrix\Calendar\Sync\Google\Builders\BuilderConnectionFromExternalData
Definition
builderconnectionfromexternaldata.php:13
Bitrix\Calendar\Sync\Google\Builders\BuilderConnectionFromExternalData\build
build()
Definition
builderconnectionfromexternaldata.php:25
Bitrix\Calendar\Sync\Google\Builders\BuilderConnectionFromExternalData\__construct
__construct(Role $user)
Definition
builderconnectionfromexternaldata.php:16
Bitrix\Calendar\Sync\Google\Factory\SERVICE_NAME
const SERVICE_NAME
Definition
factory.php:16
Bitrix\Calendar\Sync\Google\Helper\DEFAULT_HTTPS_PORT
const DEFAULT_HTTPS_PORT
Definition
helper.php:14
Bitrix\Calendar\Sync\Google\Helper\GOOGLE_API_V3_URI
const GOOGLE_API_V3_URI
Definition
helper.php:23
Bitrix\Calendar\Sync\Google\Helper\GOOGLE_API_URL
const GOOGLE_API_URL
Definition
helper.php:21
Bitrix\Calendar\Sync\Google\Helper\HTTP_SCHEME_DEFAULT
const HTTP_SCHEME_DEFAULT
Definition
helper.php:19
Bitrix\Calendar\Sync\Vendor\Vendor
Definition
vendor.php:9
Bitrix\Calendar\Core\Builders\Builder
Definition
builder.php:6
Bitrix\Calendar\Sync\Google\Builders
Definition
buidlersynceventfromexternalevent.php:3
modules
calendar
lib
sync
google
builders
builderconnectionfromexternaldata.php
Создано системой
1.10.0