Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
provideroauth.php
1<?php
2namespace Bitrix\Rest\Event;
3
6
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}