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 | 1 | */ |
|
56 | protected $documentEscapeService = null; |
||
57 | 1 | ||
58 | 1 | /** |
|
59 | * @var TypoScriptConfiguration|null |
||
60 | */ |
||
61 | protected $typoScriptConfiguration = null; |
||
62 | |||
63 | /** |
||
64 | * @var QueryBuilder |
||
65 | */ |
||
66 | protected $queryBuilder; |
||
67 | |||
68 | /** |
||
69 | 6 | * Repository constructor. |
|
70 | * @param DocumentEscapeService|null $documentEscapeService |
||
71 | * @param QueryBuilder|null $queryBuilder |
||
72 | 6 | */ |
|
73 | 2 | 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 | 5 | */ |
|
86 | public function findOneByPageIdAndByLanguageId($pageId, $languageId) |
||
91 | 1 | ||
92 | /** |
||
93 | * Returns all found Apache_Solr_Document[] by given page id and language id. |
||
94 | 3 | * Returns empty array if nothing found, e.g. if no language or no page(or no index for page) is present. |
|
95 | 3 | * |
|
96 | * @param int $pageId |
||
97 | 2 | * @param int $languageId |
|
98 | 2 | * @return \Apache_Solr_Document[] |
|
99 | */ |
||
100 | public function findByPageIdAndByLanguageId($pageId, $languageId) |
||
112 | 1 | ||
113 | 1 | /** |
|
114 | 1 | * Initializes Search for given language |
|
115 | 1 | * |
|
116 | 1 | * @param int $languageId |
|
117 | 1 | */ |
|
118 | 1 | protected function initializeSearch($pageId, $languageId = 0) |
|
132 | 1 | ||
133 | /** |
||
134 | * Retrieves an instance of the Search object. |
||
135 | * |
||
136 | * @param SolrService $solrConnection |
||
137 | * @return Search |
||
138 | */ |
||
139 | protected function getSearch($solrConnection) |
||
143 | } |
||
144 |