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/yandex.market/lib/reference/agent/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/yandex.market/lib/reference/agent/base.php
<?php

namespace Yandex\Market\Reference\Agent;

use Bitrix\Main;

abstract class Base
{
	public static function getClassName()
	{
		return '\\' . static::class;
	}

	public static function isRegistered($agentParams = null)
	{
		$className = static::getClassName();

		$agentParams = !isset($agentParams) ? static::getDefaultParams() : array_merge(
			static::getDefaultParams(),
			$agentParams
		);

		return Controller::isRegistered($className, $agentParams);
	}

	/**
	 * �������� �����
	 *
	 * @param $agentParams array|null �������� ������, ���:
	 *               method => string # �������� ������ (�����������)
	 *               arguments => array # �������� ����� ������ (�����������)
	 *               interval => integer, # �������� �������, � ������� (�����������)
	 *               sort => integer, # ����������, ��-������� � 100 (�����������)
	 *               next_exec => string, # ���� � ������� Y-m-d H:i:s (�����������)
	 *
	 * @throws Main\NotImplementedException
	 * @throws Main\SystemException
	 * */
	public static function register($agentParams = null)
	{
		$className = static::getClassName();

		$agentParams = !isset($agentParams) ? static::getDefaultParams() : array_merge(
			static::getDefaultParams(),
			$agentParams
		);

		Controller::register($className, $agentParams);
	}

	/**
	 * ������ �����
	 *
	 * @param array|null $agentParams
	 *
	 * @throws \Bitrix\Main\NotImplementedException
	 * @throws \Bitrix\Main\SystemException
	 */
	public static function unregister($agentParams = null)
	{
		$className = static::getClassName();

		$agentParams = !isset($agentParams) ? static::getDefaultParams() : array_merge(
			static::getDefaultParams(),
			$agentParams
		);

		Controller::unregister($className, $agentParams);
	}

	/**
	 * ������� �� ����� ������, �������� ��������� ����� ��� �������� false
	 *
	 * @param $method string
	 * @param $arguments array|null
	 *
	 * @return string|null
	 * */
	public static function callAgent($method, $arguments = null)
	{
		$className = static::getClassName();
		$result = '';

		if (is_array($arguments))
		{
			$callResult = call_user_func_array(array($className, $method), $arguments);
		}
		else
		{
			$callResult = call_user_func(array($className, $method));
		}

		if ($callResult !== false)
		{
			if (is_array($callResult))
			{
				$arguments = $callResult;
			}

			$result = Controller::getAgentCall($className, $method, $arguments);
		}

		return $result;
	}

	/**
	 * @return array ������� ������ �� �������� �� ������� (����� run), ���:
	 *               method => string # �������� ������ (�����������)
	 *               arguments => array # �������� ����� ������ (�����������)
	 *               interval => integer, # �������� �������, � ������� (�����������)
	 *               sort => integer, # ����������, ��-������� � 100 (�����������)
	 *               next_exec => string, # ���� � ������� Y-m-d H:i:s (�����������)
	 * */

	public static function getDefaultParams()
	{
		return array();
	}

	/**
	 *  ����� ������ �� �������, ������� ��� �������� false
	 *
	 * @return mixed|false
	 * */

	public static function run()
	{
		return false;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit