3declare(strict_types=1);
20 ?
string $prevCompletedStep =
null,
29 if (
null !== $prevCompletedStep)
31 $params[] =
'\'' . $prevCompletedStep .
'\'';
43 return __CLASS__ .
'::processCleanup(' . implode(
', ',
$params) .
');';
52 $params = [$chatId, $currentChatId];
59 return __CLASS__ .
'::processChat(' . implode(
', ',
$params) .
');';
62 public static function register(
64 ?
int $currentChatId =
null,
68 if (
null === $currentChatId)
70 $currentChatId = $chatId;
74 self::formatChatAgentName(
93 string $prevCompletedStep =
null,
97 $limit = intval(Option::get(
'im',
'chat_cleanup_limit', self::CLEANUP_LIMIT));
99 $nextCompletedStep = $collector->processCleanup($limit, $prevCompletedStep);
101 if (
null === $nextCompletedStep)
105 if (
null === $nextChatId)
136 if ($chatId !== $currentChatId)
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
static formatCleanupAgentName(int $chatId, int $currentChatId, ?string $prevCompletedStep=null, ?int $userId=null,)
static formatChatAgentName(int $chatId, int $currentChatId, ?int $userId=null,)
static processCleanup(int $chatId, int $currentChatId, ? string $prevCompletedStep=null, ?int $userId=null,)
static processChat(int $chatId, int $currentChatId, ?int $userId=null,)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']