1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
base.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Calendar\Core\Oauth
;
4
5
use
Bitrix\Main\Engine\UrlManager
;
6
use
Bitrix\Main\Loader
;
7
use
Bitrix\Main\Security\Random
;
8
use
Bitrix\Main\Web\Uri
;
9
10
abstract
class
Base
11
{
15
protected \CSocServAuth
$oauthClient
;
16
20
protected
string
$serviceName
;
21
26
public
static
function
getInstance
(): ?static
27
{
28
if
(!Loader::includeModule(
'socialservices'
))
29
{
30
return
null
;
31
}
32
33
if
(!
$userId
= \CCalendar::GetCurUserId())
34
{
35
return
null
;
36
}
37
38
$className = static::class;
39
40
$instance
=
new
$className(
$userId
);
41
42
if
(!
$instance
->checkService())
43
{
44
return
null
;
45
}
46
47
$instance
->serviceName = $className::getServiceName();
48
49
return
$instance
;
50
}
51
55
abstract
protected
function
__construct
(
$userId
);
56
60
abstract
public
function
getUrl
(): string;
61
65
abstract
protected
function
checkService
(): bool;
66
67
71
abstract
public
static
function
getServiceName
(): string;
72
}
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Calendar\Core\Oauth\Base
Определения
base.php:11
Bitrix\Calendar\Core\Oauth\Base\getServiceName
static getServiceName()
Bitrix\Calendar\Core\Oauth\Base\__construct
__construct($userId)
Bitrix\Calendar\Core\Oauth\Base\$oauthClient
CSocServAuth $oauthClient
Определения
base.php:15
Bitrix\Calendar\Core\Oauth\Base\checkService
checkService()
Bitrix\Calendar\Core\Oauth\Base\getInstance
static getInstance()
Определения
base.php:26
Bitrix\Calendar\Core\Oauth\Base\getUrl
getUrl()
Bitrix\Calendar\Core\Oauth\Base\$serviceName
string $serviceName
Определения
base.php:20
Bitrix\Main\Engine\UrlManager
Определения
urlmanager.php:11
Bitrix\Main\Loader
Определения
loader.php:13
Bitrix\Main\Security\Random
Определения
random.php:6
Bitrix\Main\Web\Uri
Определения
uri.php:17
Bitrix\Calendar\Core\Oauth
Определения
base.php:3
$instance
$instance
Определения
ps_b24_final.php:14
bitrix
modules
calendar
lib
core
oauth
base.php
Создано системой
1.14.0