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/location/lib/repository/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/location/lib/repository/locationrepository.php
<?php

namespace Bitrix\Location\Repository;

use Bitrix\Location\Entity;
use Bitrix\Location\Repository\Location\Strategy\Delete;
use Bitrix\Location\Repository\Location\Strategy\Find;
use Bitrix\Location\Repository\Location\Strategy\Save;
use Bitrix\Main\Result;

/**
 * Class Location
 * @package Bitrix\Location\Repository
 */
class LocationRepository
{
	private $findStrategy;
	private $saveStrategy;
	private $deleteStrategy;

	/**
	 * LocationRepository constructor.
	 * @param Find $findStrategy
	 * @param Save $saveStrategy
	 * @param Delete $deleteStrategy
	 */
	public function __construct(Find $findStrategy, Save $saveStrategy, Delete $deleteStrategy)
	{
		$this->findStrategy = $findStrategy;
		$this->saveStrategy = $saveStrategy;
		$this->deleteStrategy = $deleteStrategy;
	}

	/**
	 * @inheritDoc
	 */
	public function findById(int $id, string $languageId, int $searchScope)
	{
		return $this->findStrategy->findById($id, $languageId, $searchScope);
	}

	/**
	 * @param string $externalId
	 * @param string $sourceCode
	 * @param string $languageId
	 * @param int $searchScope
	 * @return Entity\Location|bool|null
	 */
	public function findByExternalId(string $externalId, string $sourceCode, string $languageId, int $searchScope)
	{
		return $this->findStrategy->findByExternalId($externalId, $sourceCode, $languageId, $searchScope);
	}

	/**
	 * @param string $externalId
	 * @param string $sourceCode
	 * @param string $languageId
	 * @param int $searchScope
	 * @return Entity\Location|bool|null
	 */
	public function findByCoords(float $lat, float $lng, int $zoom, string $languageId, int $searchScope)
	{
		return $this->findStrategy->findByCoords($lat, $lng, $zoom, $languageId, $searchScope);
	}

	/**
	 * @param string $text
	 * @param string $languageId
	 * @param int $searchScope
	 * @return Entity\Generic\Collection|bool
	 */
	public function findByText(string $text, string $languageId, int $searchScope)
	{
		return $this->findStrategy->findByText($text, $languageId, $searchScope);
	}

	/**
	 * @param array $params
	 * @param int $searchScope
	 * @return array
	 */
	public function autocomplete(array $params, int $searchScope)
	{
		return $this->findStrategy->autocomplete($params, $searchScope);
	}

	/**
	 * @param Entity\Location $location
	 * @return Result
	 */
	public function save(Entity\Location $location)
	{
		return $this->saveStrategy->save($location);
	}

	/**
	 * @param Entity\Location $location
	 * @return Result
	 */
	public function delete(Entity\Location $location): Result
	{
		return $this->deleteStrategy->delete($location);
	}

	/**
	 * @param Entity\Location $location
	 * @param string $languageId
	 * @param int $searchScope
	 * @return Entity\Location\Parents
	 */
	public function findParents(Entity\Location $location, string $languageId, int $searchScope)
	{
		return $this->findStrategy->findParents($location, $languageId, $searchScope);
	}

	public function saveParents(Entity\Location\Parents $parents): Result
	{
		return $this->saveStrategy->saveParents($parents);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit