1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
AuthorizeUserCommand.php
См. документацию.
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
Bitrix\Rest\Public\Command\Auth
;
6
7
use \Bitrix\Main;
8
9
class
AuthorizeUserCommand
extends
Main\Command\AbstractCommand
10
{
11
public
function
__construct
(
12
public
readonly
int
$userId
,
13
public
readonly ?
int
$applicationId,
14
public
readonly ?
Main
\
Type
\
DateTime
$timePeriod =
null
,
15
)
16
{
17
}
18
19
protected
function
execute
():
Main
\
Result
20
{
21
$result
=
new
Main\Result
();
22
try
23
{
24
(
new
AuthorizeUserCommandHandler
())($this);
25
}
26
catch
(
Main
\
AccessDeniedException
|
Main
\
ObjectNotFoundException
$e)
27
{
28
$result
->addError(
new
Main
\
Error
($e->getMessage(), $e->getCode()));
29
}
30
31
return
$result
;
32
}
33
34
public
function
toArray
():
array
35
{
36
return
[
37
'userId'
=>
$this->userId
,
38
'applicationId'
=> $this->applicationId,
39
];
40
}
41
}
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Main\AccessDeniedException
Определения
AccessDeniedException.php:9
Bitrix\Main\Command\AbstractCommand
Определения
AbstractCommand.php:14
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\ORM\Data\Result
Определения
result.php:16
Bitrix\Main\ObjectNotFoundException
Определения
ObjectNotFoundException.php:9
Bitrix\Main\Type\DateTime
Определения
datetime.php:9
Bitrix\Rest\Public\Command\Auth\AuthorizeUserCommandHandler
Определения
AuthorizeUserCommandHandler.php:11
Bitrix\Rest\Public\Command\Auth\AuthorizeUserCommand
Определения
AuthorizeUserCommand.php:10
Bitrix\Rest\Public\Command\Auth\AuthorizeUserCommand\execute
execute()
Определения
AuthorizeUserCommand.php:19
Bitrix\Rest\Public\Command\Auth\AuthorizeUserCommand\toArray
toArray()
Определения
AuthorizeUserCommand.php:34
Bitrix\Rest\Public\Command\Auth\AuthorizeUserCommand\__construct
__construct(public readonly int $userId, public readonly ?int $applicationId, public readonly ?Main\Type\DateTime $timePeriod=null,)
Определения
AuthorizeUserCommand.php:11
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
Bitrix\Main\Type
Определения
collection.php:2
Bitrix\Main
Bitrix\Rest\Public\Command\Auth
Определения
AuthorizeUserCommand.php:5
bitrix
modules
rest
lib
Public
Command
Auth
AuthorizeUserCommand.php
Создано системой
1.14.0