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/ilovecveti.ru/bitrix/modules/sale/lib/tradingplatform/ebay/api/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/sale/lib/tradingplatform/ebay/api/entity.php
<?php

namespace Bitrix\Sale\TradingPlatform\Ebay\Api;

use Bitrix\Main\Localization\Loc;
use Bitrix\Main\SystemException;
use Bitrix\Main\ArgumentNullException;

Loc::loadMessages(__FILE__);

abstract class Entity
{
	protected $siteId;
	protected $apiCaller;
	protected $authToken;
	protected $ebaySiteId;
	protected $warningLevel = "High";

	public function __construct($siteId)
	{
		if(!isset($siteId))
			throw new ArgumentNullException("siteId");

		$this->siteId = $siteId;
		$ebay = \Bitrix\Sale\TradingPlatform\Ebay\Ebay::getInstance();
		$settings = $ebay->getSettings();

		if(empty($settings[$siteId]["API"]["SITE_ID"]))
			throw new SystemException(Loc::getMessage('SALE_EBAY_ENTITY_SETTINGS_EMPTY', array('#SITE_ID#' => $siteId)));

		if(empty($settings[$siteId]["API"]["SITE_ID"]))
			throw new ArgumentNullException(Loc::getMessage('SALE_EBAY_ENTITY_TOKEN_EMPTY', array('#SITE_ID#' => $siteId)));

		$this->ebaySiteId = $settings[$siteId]["API"]["SITE_ID"];
		$this->authToken = $settings[$siteId]["API"]["AUTH_TOKEN"];
		$this->apiCaller = new Caller( array(
			"EBAY_SITE_ID" => $settings[$siteId]["API"]["SITE_ID"],
			"URL" => $ebay->getApiUrl(),
		));
	}

	protected function array2Tags(array $params)
	{
		$result = "";

		foreach($params as $tag => $value)
		{
			if(is_array($value))
			{
				reset($value);

				if(key($value) !== 0)
				{
					$result .= $this->array2Tags($value);
				}
				else
				{
					foreach($value as $val)
					{
						$result .= '<'.$tag.'>'.$val.'</'.$tag.'>'."\n";
					}
				}
			}
			elseif($value <> '')
			{
				$result .= '<'.$tag.'>'.$value.'</'.$tag.'>'."\n";
			}
		}

		return $result;
	}
} 

Youez - 2016 - github.com/yon3zu
LinuXploit