1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
DocUrl.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Rest\Infrastructure\Integration
;
4
5
use
Bitrix\Main\Application
;
6
use
Bitrix\Main\Web\Uri
;
7
8
class
DocUrl
9
{
10
public
function
__construct
(
11
private
readonly ?
string
$region
,
12
)
13
{}
14
15
public
static
function
createByDefault
(): self
16
{
17
return
new
self
(
18
Application::getInstance()->getLicense()->getRegion()
19
);
20
}
21
22
public
function
getDocUrl
(): ?
Uri
23
{
24
return
new
Uri
(
25
$this->getDocUrlByRegion($this->region)
26
);
27
}
28
29
private
function
getDocUrlByRegion(
string
$region
): string
30
{
31
return
match (
$region
)
32
{
33
'ru'
,
'by'
,
'kz'
=>
'https://apidocs.bitrix24.ru/'
,
34
default
=>
'https://apidocs.bitrix24.com/'
,
35
};
36
}
37
}
Bitrix\Main\Application
Определения
application.php:30
Bitrix\Main\Web\Uri
Определения
uri.php:17
Bitrix\Rest\Infrastructure\Integration\DocUrl
Определения
DocUrl.php:9
Bitrix\Rest\Infrastructure\Integration\DocUrl\__construct
__construct(private readonly ?string $region,)
Определения
DocUrl.php:10
Bitrix\Rest\Infrastructure\Integration\DocUrl\createByDefault
static createByDefault()
Определения
DocUrl.php:15
Bitrix\Rest\Infrastructure\Integration\DocUrl\getDocUrl
getDocUrl()
Определения
DocUrl.php:22
$region
$region
Определения
.description.php:13
Bitrix\Rest\Infrastructure\Integration
Определения
DocUrl.php:3
bitrix
modules
rest
lib
Infrastructure
Integration
DocUrl.php
Создано системой
1.14.0