Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
opendesktopapp.php
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
Bitrix\Main\Engine\Response
;
6
7
use
Bitrix\Main\HttpResponse
;
8
9
final
class
OpenDesktopApp
extends
HttpResponse
10
{
11
public
const
DESKTOP_PROTOCOL
=
'bx://'
;
12
private
string
$url;
13
14
public
function
__construct
(
string
$url)
15
{
16
$this->url = ltrim($url,
'/'
);
17
18
parent::__construct();
19
}
20
21
protected
function
buildDesktopUrl
(): string
22
{
23
return
static::DESKTOP_PROTOCOL . $this->url;
24
}
25
26
public
function
send
(): void
27
{
28
$this->
addHeader
(
'Location'
, $this->
buildDesktopUrl
());
29
parent::send();
30
}
31
}
Bitrix\Main\Engine\Response\OpenDesktopApp
Definition
opendesktopapp.php:10
Bitrix\Main\Engine\Response\OpenDesktopApp\send
send()
Definition
opendesktopapp.php:26
Bitrix\Main\Engine\Response\OpenDesktopApp\DESKTOP_PROTOCOL
const DESKTOP_PROTOCOL
Definition
opendesktopapp.php:11
Bitrix\Main\Engine\Response\OpenDesktopApp\buildDesktopUrl
buildDesktopUrl()
Definition
opendesktopapp.php:21
Bitrix\Main\Engine\Response\OpenDesktopApp\__construct
__construct(string $url)
Definition
opendesktopapp.php:14
Bitrix\Main\HttpResponse
Definition
httpresponse.php:8
Bitrix\Main\HttpResponse\addHeader
addHeader($name, $value='')
Definition
httpresponse.php:72
Bitrix\Main\Engine\Response
Definition
ajaxjson.php:3
modules
main
lib
engine
response
opendesktopapp.php
Создано системой
1.10.0