Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
provideroauth.php
1
<?php
2
namespace
Bitrix\Rest\Event
;
3
4
use
Bitrix\Rest\OAuthService
;
5
use
Bitrix\Rest\Tools\Diagnostics\LoggerManager
;
6
7
class
ProviderOAuth
implements
ProviderInterface
8
{
12
protected
static
$instance
=
null
;
13
14
public
static
function
instance
()
15
{
16
if
(static::$instance ===
null
)
17
{
18
static::$instance =
new
static
();
19
}
20
21
return
static::$instance;
22
}
23
24
public
function
send
(array $queryData)
25
{
26
if
(
OAuthService::getEngine
()->isRegistered())
27
{
28
$result =
OAuthService::getEngine
()->getClient()->sendEvent($queryData);
29
$logger = LoggerManager::getInstance()->getLogger();
30
if
($logger)
31
{
32
$logger->debug(
33
"\n{delimiter}\n"
34
.
"{date} - {host}\n{delimiter}\n"
35
.
"Event sends oauth\n"
36
.
"Count: {eventCount}"
37
.
"Result:\n"
38
.
"{result}"
,
39
[
40
'eventCount'
=> count($queryData),
41
'result'
=> $result,
42
]
43
);
44
}
45
}
46
}
47
}
Bitrix\Rest\Event\ProviderOAuth
Definition
provideroauth.php:8
Bitrix\Rest\Event\ProviderOAuth\instance
static instance()
Definition
provideroauth.php:14
Bitrix\Rest\Event\ProviderOAuth\send
send(array $queryData)
Definition
provideroauth.php:24
Bitrix\Rest\Event\ProviderOAuth\$instance
static $instance
Definition
provideroauth.php:12
Bitrix\Rest\OAuthService
Definition
oauthservice.php:35
Bitrix\Rest\OAuthService\getEngine
static getEngine()
Definition
oauthservice.php:46
Bitrix\Rest\Tools\Diagnostics\LoggerManager
Definition
LoggerManager.php:14
Bitrix\Rest\Event\ProviderInterface
Definition
providerinterface.php:5
Bitrix\Rest\Event
Definition
callback.php:2
modules
rest
lib
event
provideroauth.php
Создано системой
1.10.0