1 | <?php |
||
43 | class Repository implements SingletonInterface |
||
44 | { |
||
45 | |||
46 | /** |
||
47 | * Search |
||
48 | * |
||
49 | * @var \ApacheSolrForTypo3\Solr\Search |
||
50 | */ |
||
51 | protected $search; |
||
52 | |||
53 | /** |
||
54 | * @var DocumentEscapeService |
||
55 | */ |
||
56 | protected $documentEscapeService = null; |
||
57 | |||
58 | /** |
||
59 | * @var TypoScriptConfiguration|null |
||
60 | */ |
||
61 | protected $typoScriptConfiguration = null; |
||
62 | |||
63 | /** |
||
64 | * @var QueryBuilder |
||
65 | */ |
||
66 | protected $queryBuilder; |
||
67 | |||
68 | /** |
||
69 | * Repository constructor. |
||
70 | * @param DocumentEscapeService|null $documentEscapeService |
||
71 | * @param QueryBuilder|null $queryBuilder |
||
72 | */ |
||
73 | 6 | public function __construct(DocumentEscapeService $documentEscapeService = null, TypoScriptConfiguration $typoScriptConfiguration = null, QueryBuilder $queryBuilder = null) |
|
79 | |||
80 | /** |
||
81 | * Returns firs found Apache_Solr_Document for current page by given language id. |
||
82 | * |
||
83 | * @param $languageId |
||
84 | * @return \Apache_Solr_Document|false |
||
85 | */ |
||
86 | 1 | public function findOneByPageIdAndByLanguageId($pageId, $languageId) |
|
91 | |||
92 | /** |
||
93 | * Returns all found Apache_Solr_Document[] by given page id and language id. |
||
94 | * Returns empty array if nothing found, e.g. if no language or no page(or no index for page) is present. |
||
95 | * |
||
96 | * @param int $pageId |
||
97 | * @param int $languageId |
||
98 | * @return \Apache_Solr_Document[] |
||
99 | */ |
||
100 | 6 | public function findByPageIdAndByLanguageId($pageId, $languageId) |
|
112 | |||
113 | /** |
||
114 | * @param string $type |
||
115 | * @param int $uid |
||
116 | * @param int $pageId |
||
117 | * @param int $languageId |
||
118 | * @return \Apache_Solr_Document[]|array |
||
119 | */ |
||
120 | public function findByTypeAndPidAndUidAndLanguageId($type, $uid, $pageId, $languageId): array |
||
132 | |||
133 | /** |
||
134 | * Initializes Search for given language |
||
135 | * |
||
136 | * @param int $languageId |
||
137 | */ |
||
138 | 5 | protected function initializeSearch($pageId, $languageId = 0) |
|
152 | |||
153 | /** |
||
154 | * Retrieves an instance of the Search object. |
||
155 | * |
||
156 | * @param SolrConnection $solrConnection |
||
157 | * @return Search |
||
158 | */ |
||
159 | 1 | protected function getSearch($solrConnection) |
|
163 | } |
||
164 |