1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
DocUrl.php
См. документацию.
1<?php
2
4
7
8class 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}
Определения uri.php:17
__construct(private readonly ?string $region,)
Определения DocUrl.php:10
$region
Определения .description.php:13