%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.138.34.75 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 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, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sender/lib/internals/querycontroller/ |
Upload File : |
<?php /** * Bitrix Framework * @package bitrix * @subpackage sender * @copyright 2001-2017 Bitrix */ namespace Bitrix\Sender\Internals\QueryController; use Bitrix\Main\ArgumentException; use Bitrix\Main\Localization\Loc; Loc::loadMessages(__FILE__); /** * Class Base * @package Bitrix\Sender\Internals\QueryController */ class Base { /** @var callable[] $checkers Checkers. */ protected $checkers = array(); /** @var callable[] $responseModifiers Response modifiers. */ protected $responseModifiers = array(); /** * Add checker. * * @param callable $checker Checker. * @return $this * @throws ArgumentException */ public function addChecker($checker) { if (!is_callable($checker)) { throw new ArgumentException("Argument `checker` should be callabe."); } $this->checkers[] = $checker; return $this; } /** * Set checkers. * * @param callable[] $checkers Checkers. * @return $this */ public function setCheckers(array $checkers) { foreach ($checkers as $checker) { $this->addChecker($checker); } return $this; } /** * Add response modifier. * * @param callable $modifier Modifier. * @return $this * @throws ArgumentException */ public function addResponseModifier($modifier) { if (!is_callable($modifier)) { throw new ArgumentException("Argument `modifier` should be callabe."); } $this->responseModifiers[] = $modifier; return $this; } /** * Set response modifiers. * * @param callable[] $modifiers Modifiers. * @return $this */ public function setResponseModifiers(array $modifiers) { foreach ($modifiers as $modifier) { $this->addResponseModifier($modifier); } return $this; } /** * Get checkers. * * @return array */ public function getCheckers() { return $this->checkers; } /** * Get response modifiers. * * @return array */ public function getResponseModifiers() { return $this->responseModifiers; } /** * Call. * * @param callable $callee Callee. * @param array $parameters Parameters. * @return mixed * @throws ArgumentException */ public static function call($callee, array $parameters = array()) { if (!is_callable($callee)) { throw new ArgumentException("Argument `callee` should be callabe."); } return call_user_func_array($callee, $parameters); } }