uawdijnntqw1x1x1
IP : 18.217.13.162
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
.
/
b24.axolotl.ru
/
public_html
/
bitrix
/
modules
/
imbot
/
lib
/
controller.php
/
/
<?php namespace Bitrix\ImBot; /** * Class Controller * * @package Bitrix\ImBot */ class Controller { /** * @param string $botName * @param string $command * @param array $params * * @return mixed|null */ public static function sendToBot($botName, $command, $params) { $botName = trim(preg_replace("/[^a-z]/", "", mb_strtolower($botName))); if ($botName) { $params = self::prepareParams($params); if ($params['BOT_ID']) { $bot = \Bitrix\Im\Bot::getCache($params['BOT_ID']); if ($bot && class_exists($bot['CLASS']) && method_exists($bot['CLASS'], 'onAnswerAdd')) { return call_user_func_array(array($bot['CLASS'], 'onAnswerAdd'), array($command, $params)); } } $className = '\\Bitrix\\ImBot\\Bot\\'.ucfirst($botName); if ( class_exists($className, true) && method_exists($className, 'onAnswerAdd') ) { return call_user_func_array([$className, 'onAnswerAdd'], [$command, $params]); } } return null; } /** * @param string $serviceName * @param string $command * @param array $params * * @return mixed|null */ public static function sendToService($serviceName, $command, $params) { $serviceName = trim(preg_replace("/[^a-z]/", "", mb_strtolower($serviceName))); if ($serviceName) { $className = '\\Bitrix\\ImBot\\Service\\'.ucfirst($serviceName); if ( class_exists($className, true) && method_exists($className, 'onReceiveCommand') ) { $params = self::prepareParams($params); return call_user_func_array([$className, 'onReceiveCommand'], [$command, $params]); } } return null; } /** * @param array $params * @return array */ private static function prepareParams($params) { foreach ($params as $key => $value) { if ($value === '#ZERO#') { $value = '0'; } else if ($value === '#EMPTY#') { $value = ''; } $params[$key] = $value; } return $params; } }
/var/www/axolotl/data/www/./b24.axolotl.ru/public_html/bitrix/modules/imbot/lib/controller.php