Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
countercontroller.php
1
<?php
9
namespace
Bitrix\Socialnetwork\Internals\Counter
;
10
11
use
Bitrix\Socialnetwork\Internals\Counter\Exception\UnknownCounterException
;
12
use
Bitrix\Socialnetwork\Internals\Counter\Provider
;
13
14
class
CounterController
15
{
16
public
static
function
getValue
(
string
$name =
''
,
int
$entityId = 0,
int
$userId = 0): array
17
{
18
$instance =
self::getInstance
($name, $entityId, $userId);
19
20
return
$instance->getCounterValue();
21
}
22
30
public
static
function
getInstance
(
string
$name =
''
,
int
$entityId = 0,
int
$userId = 0): Provider\
Base
31
{
32
switch
($name)
33
{
34
case
CounterDictionary::COUNTER_WORKGROUP_REQUESTS_IN
:
35
$result =
new
Provider\WorkgroupRequestsIn
([
36
'workgroupId'
=> $entityId,
37
]);
38
break
;
39
case
CounterDictionary::COUNTER_WORKGROUP_REQUESTS_OUT
:
40
$result =
new
Provider\WorkgroupRequestsOut
([
41
'workgroupId'
=> $entityId,
42
]);
43
break
;
44
case
CounterDictionary::COUNTER_WORKGROUP_LIST_LIVEFEED
:
45
$result =
new
Provider\WorkgroupListLivefeed
([
46
'userId'
=> $userId,
47
]);
48
break
;
49
case
CounterDictionary::COUNTER_WORKGROUP_LIST_TASKS
:
50
$result =
new
Provider\WorkgroupListTasks
([
51
'userId'
=> $userId,
52
]);
53
break
;
54
default
:
55
throw
new
UnknownCounterException
();
56
}
57
58
return
$result;
59
}
60
}
Bitrix\Socialnetwork\Internals\Counter\CounterController
Definition
countercontroller.php:15
Bitrix\Socialnetwork\Internals\Counter\CounterController\getValue
static getValue(string $name='', int $entityId=0, int $userId=0)
Definition
countercontroller.php:16
Bitrix\Socialnetwork\Internals\Counter\CounterController\getInstance
static getInstance(string $name='', int $entityId=0, int $userId=0)
Definition
countercontroller.php:30
Bitrix\Socialnetwork\Internals\Counter\CounterDictionary\COUNTER_WORKGROUP_LIST_TASKS
const COUNTER_WORKGROUP_LIST_TASKS
Definition
counterdictionary.php:18
Bitrix\Socialnetwork\Internals\Counter\CounterDictionary\COUNTER_WORKGROUP_REQUESTS_IN
const COUNTER_WORKGROUP_REQUESTS_IN
Definition
counterdictionary.php:15
Bitrix\Socialnetwork\Internals\Counter\CounterDictionary\COUNTER_WORKGROUP_REQUESTS_OUT
const COUNTER_WORKGROUP_REQUESTS_OUT
Definition
counterdictionary.php:16
Bitrix\Socialnetwork\Internals\Counter\CounterDictionary\COUNTER_WORKGROUP_LIST_LIVEFEED
const COUNTER_WORKGROUP_LIST_LIVEFEED
Definition
counterdictionary.php:17
Bitrix\Socialnetwork\Internals\Counter\Exception\UnknownCounterException
Definition
unknowncounterexception.php:8
Bitrix\Socialnetwork\Internals\Counter\Provider\WorkgroupListLivefeed
Definition
workgrouplistlivefeed.php:23
Bitrix\Socialnetwork\Internals\Counter\Provider\WorkgroupListTasks
Definition
workgrouplisttasks.php:17
Bitrix\Socialnetwork\Internals\Counter\Provider\WorkgroupRequestsIn
Definition
workgrouprequestsin.php:16
Bitrix\Socialnetwork\Internals\Counter\Provider\WorkgroupRequestsOut
Definition
workgrouprequestsout.php:16
Bitrix\Socialnetwork\Internals\Counter\Provider\Base
Definition
base.php:13
Bitrix\Socialnetwork\Internals\Counter\Provider
Definition
base.php:10
Bitrix\Socialnetwork\Internals\Counter
Definition
countercontroller.php:9
modules
socialnetwork
lib
internals
counter
countercontroller.php
Создано системой
1.10.0