Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
GetCurrentUserResponse.php
1
<?php
2
3
namespace
Bitrix\Bizproc\Api\Response\UserService
;
4
5
use
Bitrix\Bizproc\Result
;
6
use
Bitrix\Bizproc\Api\Response\Error
;
7
use
Bitrix\Main\Engine\CurrentUser
;
8
9
class
GetCurrentUserResponse
extends
Result
10
{
11
public
static
function
createUnauthorizedError
(): static
12
{
13
return
static::createError(
Error::fromCode
(
Error::UNAUTHORIZED
));
14
}
15
16
public
function
getUser
(): ?
CurrentUser
17
{
18
return
$this->data[
'user'
] ??
null
;
19
}
20
}
Bitrix\Bizproc\Api\Response\Error
Definition
Error.php:8
Bitrix\Bizproc\Api\Response\Error\UNAUTHORIZED
const UNAUTHORIZED
Definition
Error.php:9
Bitrix\Bizproc\Api\Response\UserService\GetCurrentUserResponse
Definition
GetCurrentUserResponse.php:10
Bitrix\Bizproc\Api\Response\UserService\GetCurrentUserResponse\createUnauthorizedError
static createUnauthorizedError()
Definition
GetCurrentUserResponse.php:11
Bitrix\Bizproc\Api\Response\UserService\GetCurrentUserResponse\getUser
getUser()
Definition
GetCurrentUserResponse.php:16
Bitrix\Bizproc\Error\fromCode
static fromCode(string $code, $customData=null)
Definition
error.php:13
Bitrix\Bizproc\Result
Definition
result.php:6
Bitrix\Main\Engine\CurrentUser
Definition
currentuser.php:8
Bitrix\Bizproc\Api\Response\UserService
Definition
GetCurrentUserResponse.php:3
modules
bizproc
lib
Api
Response
UserService
GetCurrentUserResponse.php
Создано системой
1.10.0