Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
openmobileapp.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
OpenMobileApp
extends
HttpResponse
10
{
11
public
const
MOBILE_PROTOCOL
=
'bitrix24://'
;
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
buildMobileUrl
(): string
22
{
23
return
static::MOBILE_PROTOCOL . $this->url;
24
}
25
26
public
function
send
(): void
27
{
28
$this->
addHeader
(
'Location'
, $this->
buildMobileUrl
());
29
parent::send();
30
}
31
}
Bitrix\Main\Engine\Response\OpenMobileApp
Definition
openmobileapp.php:10
Bitrix\Main\Engine\Response\OpenMobileApp\send
send()
Definition
openmobileapp.php:26
Bitrix\Main\Engine\Response\OpenMobileApp\buildMobileUrl
buildMobileUrl()
Definition
openmobileapp.php:21
Bitrix\Main\Engine\Response\OpenMobileApp\MOBILE_PROTOCOL
const MOBILE_PROTOCOL
Definition
openmobileapp.php:11
Bitrix\Main\Engine\Response\OpenMobileApp\__construct
__construct(string $url)
Definition
openmobileapp.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
openmobileapp.php
Создано системой
1.10.0