1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
Sync.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Controller;
4
5
use Bitrix\Im\V2\Error;
6
use Bitrix\Im\V2\Sync\SyncService;
7
use Bitrix\Main\ObjectException;
8
use Bitrix\Main\Type\DateTime;
9
use DateTimeInterface;
10
11
class
Sync
extends
BaseController
12
{
13
private
const
DATE_FORMAT = DateTimeInterface::RFC3339;
14
15
public
function
listAction
(
array
$filter
= [],
int
$limit = 50): ?
array
16
{
17
$syncService =
new
SyncService
();
18
19
if
(isset(
$filter
[
'lastDate'
]))
20
{
21
try
22
{
23
$date =
new
DateTime
(
$filter
[
'lastDate'
], self::DATE_FORMAT);
24
}
25
catch
(
ObjectException
$exception)
26
{
27
$this->addError(
new
Error
($exception->getCode(), $exception->getMessage()));
28
29
return
null
;
30
}
31
}
32
else
33
{
34
$date =
new
DateTime
(
null
, self::DATE_FORMAT);
35
}
36
37
return
$syncService->getChangesFromDate($date, $limit);
38
}
39
}
Bitrix\Im\V2\Controller\BaseController
Определения
BaseController.php:30
Bitrix\Im\V2\Controller\Sync\listAction
listAction(array $filter=[], int $limit=50)
Определения
Sync.php:15
Bitrix\Im\V2\Sync\SyncService
Определения
SyncService.php:12
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\ObjectException
Определения
ObjectException.php:9
Bitrix\Main\Type\DateTime
Определения
datetime.php:9
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$filter
$filter
Определения
iblock_catalog_list.php:54
Bitrix\Im\V2\Sync
Определения
ChatsSync.php:3
bitrix
modules
im
lib
V2
Controller
Sync.php
Создано системой
1.14.0