uawdijnntqw1x1x1
IP : 3.133.141.1
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
/
kirov.axolotls.ru
/
bitrix
/
modules
/
rest
/
lib
/
notify.php
/
/
<?php namespace Bitrix\Rest; use Bitrix\Main\ArgumentException; use Bitrix\Main\ArgumentNullException; class Notify { const NOTIFY_IM = 'im'; const NOTIFY_BOT = 'bot'; protected $type; protected $userList = array(); /** * @var INotify */ protected $notifier = null; public function __construct($notifyType, array $userList) { $this->setType($notifyType); $this->setUserList($userList); } public function send($clientId, $token, $method, $message) { foreach($this->userList as $userId) { $this->getNotifier()->send($clientId, $userId, $token, $method, $message); } } public function setType($notifyType) { if($notifyType == static::NOTIFY_IM || $notifyType == static::NOTIFY_BOT) { $this->type = $notifyType; } else { throw new ArgumentException('Wrong notify type', 'type'); } } public function getType() { return $this->type; } public function setUserList(array $userList) { if(count($userList) > 0) { $this->userList = $userList; } else { throw new ArgumentNullException('userList'); } } public function getUserList() { return $this->userList; } /** * @return INotify */ protected function getNotifier() { if(!$this->notifier) { switch($this->type) { case static::NOTIFY_IM: $this->notifier = new NotifyIm(); break; case static::NOTIFY_BOT: $this->notifier = new NotifyIm(); break; } } return $this->notifier; } }
/var/www/axolotl/data/www/kirov.axolotls.ru/bitrix/modules/rest/lib/notify.php