Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
builderconnectionfromexternaldata.php
1<?php
2
4
11
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}