403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sender/lib/internals/querycontroller/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sender/lib/internals/querycontroller/base.php
<?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 callable.");
		}

		$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 callable.");
		}

		$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 callable.");
		}

		return call_user_func_array($callee, $parameters);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit