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 | 6 | protected $queryBuilder; |
|
67 | |||
68 | 6 | /** |
|
69 | 6 | * Repository constructor. |
|
70 | 6 | * @param DocumentEscapeService|null $documentEscapeService |
|
71 | * @param QueryBuilder|null $queryBuilder |
||
72 | */ |
||
73 | public function __construct(DocumentEscapeService $documentEscapeService = null, TypoScriptConfiguration $typoScriptConfiguration = null, QueryBuilder $queryBuilder = null) |
||
79 | |||
80 | 1 | /** |
|
81 | 1 | * 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 | public function findOneByPageIdAndByLanguageId($pageId, $languageId) |
||
91 | |||
92 | 6 | /** |
|
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 | 6 | * |
|
96 | 2 | * @param int $pageId |
|
97 | 4 | * @param int $languageId |
|
98 | 2 | * @return \Apache_Solr_Document[] |
|
99 | */ |
||
100 | 2 | public function findByPageIdAndByLanguageId($pageId, $languageId) |
|
112 | 1 | ||
113 | /** |
||
114 | 4 | * Initializes Search for given language |
|
115 | 1 | * |
|
116 | * @param int $languageId |
||
117 | */ |
||
118 | 3 | protected function initializeSearch($pageId, $languageId = 0) |
|
132 | |||
133 | 1 | /** |
|
134 | 1 | * Retrieves an instance of the Search object. |
|
135 | * |
||
136 | 1 | * @param SolrService $solrConnection |
|
137 | 1 | * @return Search |
|
138 | 1 | */ |
|
139 | 1 | protected function getSearch($solrConnection) |
|
143 | } |
||
144 |