Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
locationrepository.php
1<?php
2
4
10
16{
17 private $findStrategy;
18 private $saveStrategy;
19 private $deleteStrategy;
20
27 public function __construct(Find $findStrategy, Save $saveStrategy, Delete $deleteStrategy)
28 {
29 $this->findStrategy = $findStrategy;
30 $this->saveStrategy = $saveStrategy;
31 $this->deleteStrategy = $deleteStrategy;
32 }
33
37 public function findById(int $id, string $languageId, int $searchScope)
38 {
39 return $this->findStrategy->findById($id, $languageId, $searchScope);
40 }
41
49 public function findByExternalId(string $externalId, string $sourceCode, string $languageId, int $searchScope)
50 {
51 return $this->findStrategy->findByExternalId($externalId, $sourceCode, $languageId, $searchScope);
52 }
53
60 public function findByText(string $text, string $languageId, int $searchScope)
61 {
62 return $this->findStrategy->findByText($text, $languageId, $searchScope);
63 }
64
70 public function autocomplete(array $params, int $searchScope)
71 {
72 return $this->findStrategy->autocomplete($params, $searchScope);
73 }
74
79 public function save(Entity\Location $location)
80 {
81 return $this->saveStrategy->save($location);
82 }
83
88 public function delete(Entity\Location $location): Result
89 {
90 return $this->deleteStrategy->delete($location);
91 }
92
99 public function findParents(Entity\Location $location, string $languageId, int $searchScope)
100 {
101 return $this->findStrategy->findParents($location, $languageId, $searchScope);
102 }
103
108 public function saveParents(Entity\Location\Parents $parents)
109 {
110 return $this->saveStrategy->saveParents($parents);
111 }
112}
findParents(Entity\Location $location, string $languageId, int $searchScope)
__construct(Find $findStrategy, Save $saveStrategy, Delete $deleteStrategy)
findById(int $id, string $languageId, int $searchScope)
findByExternalId(string $externalId, string $sourceCode, string $languageId, int $searchScope)
saveParents(Entity\Location\Parents $parents)
autocomplete(array $params, int $searchScope)
findByText(string $text, string $languageId, int $searchScope)