1 | <?php |
||
38 | class SearchResult extends \Apache_Solr_Document |
||
39 | { |
||
40 | |||
41 | /** |
||
42 | * @var bool |
||
43 | */ |
||
44 | protected $throwExceptions = false; |
||
45 | |||
46 | /** |
||
47 | * @var SearchResult[] |
||
48 | */ |
||
49 | protected $variants = []; |
||
50 | |||
51 | /** |
||
52 | * Indicates if an instance of this document is a variant (a sub document of another). |
||
53 | * |
||
54 | * @var bool |
||
55 | */ |
||
56 | protected $isVariant = false; |
||
57 | |||
58 | /** |
||
59 | * References the parent document of the document is a variant. |
||
60 | * |
||
61 | * @var null |
||
62 | */ |
||
63 | protected $variantParent = null; |
||
64 | |||
65 | /** |
||
66 | * @var Group |
||
67 | */ |
||
68 | protected $group = null; |
||
69 | |||
70 | /** |
||
71 | * @param \Apache_Solr_Document $document |
||
72 | * @param bool $throwExceptions |
||
73 | */ |
||
74 | public function __construct(\Apache_Solr_Document $document, $throwExceptions = false) |
||
81 | |||
82 | /** |
||
83 | * @param string $name |
||
84 | * @param array $arguments |
||
85 | * @throws \Exception |
||
86 | * @throws \RuntimeException |
||
87 | * @return string |
||
88 | */ |
||
89 | public function __call($name, $arguments) |
||
99 | |||
100 | /** |
||
101 | * @return Group |
||
102 | */ |
||
103 | public function getGroup(): Group |
||
107 | |||
108 | /** |
||
109 | * @param Group $group |
||
110 | */ |
||
111 | public function setGroup(Group $group) |
||
115 | |||
116 | /** |
||
117 | * @return SearchResult[] |
||
118 | */ |
||
119 | public function getVariants() |
||
123 | |||
124 | /** |
||
125 | * @param SearchResult $expandedResult |
||
126 | */ |
||
127 | public function addVariant(SearchResult $expandedResult) |
||
131 | |||
132 | /** |
||
133 | * @return bool |
||
134 | */ |
||
135 | public function getIsVariant() |
||
139 | |||
140 | /** |
||
141 | * @param bool $isVariant |
||
142 | */ |
||
143 | public function setIsVariant($isVariant) |
||
147 | |||
148 | /** |
||
149 | * @return null |
||
150 | */ |
||
151 | public function getVariantParent() |
||
155 | |||
156 | /** |
||
157 | * @param null $variantParent |
||
158 | */ |
||
159 | public function setVariantParent($variantParent) |
||
163 | |||
164 | /** |
||
165 | * @return string |
||
166 | */ |
||
167 | public function getContent() |
||
171 | |||
172 | /** |
||
173 | * @return boolean |
||
174 | */ |
||
175 | public function getIsElevated() |
||
179 | |||
180 | /** |
||
181 | * @return string |
||
182 | */ |
||
183 | public function getType() |
||
187 | |||
188 | /** |
||
189 | * @return integer |
||
190 | */ |
||
191 | public function getId() |
||
195 | |||
196 | /** |
||
197 | * @return float |
||
198 | */ |
||
199 | public function getScore() |
||
203 | |||
204 | /** |
||
205 | * @return string |
||
206 | */ |
||
207 | public function getUrl() |
||
211 | |||
212 | /** |
||
213 | * @return string |
||
214 | */ |
||
215 | public function getTitle() |
||
219 | } |
||
220 |