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/cvetdv.ru/bitrix/modules/yandex.market/lib/trading/state/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/yandex.market/lib/trading/state/entityregistry.php
<?php

namespace Yandex\Market\Trading\State;

use Bitrix\Main;

class EntityRegistry
{
	public static function get($setupId, $entityType, $entityId)
	{
		$result = null;

		$query = Internals\EntityTable::getList([
			'filter' => [
				'=SETUP_ID' => $setupId,
				'=ENTITY_TYPE' => $entityType,
				'=ENTITY_ID' => $entityId,
			],
			'select' => [ 'DATA' ],
		]);

		if ($row = $query->fetch())
		{
			$result = (array)$row['DATA'];
		}

		return $result;
	}

	public static function touch($setupId, $entityType, $entityId)
	{
		Internals\EntityTable::update([
			'SETUP_ID' => $setupId,
			'ENTITY_TYPE' => $entityType,
			'ENTITY_ID' => $entityId,
		], [
			'TIMESTAMP_X' => new Main\Type\DateTime(),
		]);
	}

	public static function store($setupId, $entityType, $entityId, array $data)
	{
		$primary = [
			'SETUP_ID' => $setupId,
			'ENTITY_TYPE' => $entityType,
			'ENTITY_ID' => $entityId,
		];
		$fields = [
			'DATA' => $data,
			'TIMESTAMP_X' => new Main\Type\DateTime(),
		];

		$exists = Internals\EntityTable::getByPrimary($primary);

		if ($exists->fetch())
		{
			Internals\EntityTable::update($primary, $fields);
		}
		else
		{
			Internals\EntityTable::add($primary + $fields);
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit