uawdijnntqw1x1x1
IP : 18.117.158.174
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
/
rostov.axolotls.ru
/
bitrix
/
modules
/
tasks
/
lib
/
processor.php
/
/
<? /** * This class could be changed (removed, renamed, relocated) in any time, so do not use it in public code * * @internal * @access private */ namespace Bitrix\Tasks; use Bitrix\Main\ArgumentException; use Bitrix\Tasks\Util\User; use Bitrix\Tasks\Item; use Bitrix\Tasks\Processor\Task\Result\Impact; use Bitrix\Tasks\Processor\Task\Result; abstract class Processor { protected $userId = 0; protected $affected = array(); protected static $instances = array(); /** * @param int $userId * @return static * @throws ArgumentException */ public static function getInstance($userId = 0) { $userId = intval($userId); if(!$userId) { $userId = User::getId(); } if(!$userId) { throw new ArgumentException('User ID not defined'); } if(!array_key_exists($userId, static::$instances)) { static::$instances[$userId] = new static($userId); } return static::$instances[$userId]; } public function __construct($userId) { $this->userId = $userId; $this->reset(); } public function getUserId() { return $this->userId; } public function isDebugEnabled() { return false; } /** * Process affected item * * @param $id int task * @param mixed[] changed fields * @param mixed[] $settings * @return \Bitrix\Tasks\Processor\Task\Result */ public function processEntity($id, $data = array(), array $settings = array()) { $this->reset(); $result = new Result(); // do smth for $id $result->setData($this->affected); return $result; } protected function reset() { } /** * @param Impact $impact */ public function addImpact($impact) { $taskId = $impact->getId(); if(array_key_exists($taskId, $this->affected)) { return; } $this->affected[$taskId] = $impact; } /** * @param $taskId * @return Impact */ public function getImpactById($taskId) { return $this->affected[$taskId]; } public function hasImpact($taskId) { return array_key_exists($taskId, $this->affected); } /** * Returns task data that were changed */ public function getChanges() { $result = array(); /** @var Impact $impact */ foreach($this->affected as $impact) { $result[$impact->getId()] = $impact->exportUpdatedData(); } return $result; } }
/var/www/axolotl/data/www/rostov.axolotls.ru/bitrix/modules/tasks/lib/processor.php