uawdijnntqw1x1x1
IP : 3.129.92.14
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
/
mobile
/
lib
/
Command.php
/
/
<?php namespace Bitrix\Mobile; use Bitrix\Main\Application; use Bitrix\Main\Result; /** * Think about commands as business-scenarios that can change application state. * * For example: * - DocumentController validates input and invokes CreateDocumentCommand * - CreateDocumentCommand creates document and send some email notifications * - CreateDocumentCommand incapsulates business-rules and can be used from other controller/console/queue/etc. */ abstract class Command { abstract public function execute(): Result; public function __invoke(): Result { return $this->execute(); } /** * @param \Closure $job * @return Result * @throws \UnexpectedValueException */ protected function transaction(\Closure $job): Result { $db = Application::getConnection(); $db->startTransaction(); $result = $job(); if (!$result instanceof Result) { $db->rollbackTransaction(); $type = is_object($result) ? get_class($result) : gettype($result); throw new \UnexpectedValueException("Return value must be instance of Bitrix\\Main\\Result, $type given"); } if ($result->isSuccess()) { $db->commitTransaction(); } else { $db->rollbackTransaction(); } return $result; } }
/var/www/axolotl/data/www/./b24.axolotl.ru/public_html/bitrix/modules/mobile/lib/Command.php