1 | <?php |
||
19 | class Query |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * @param EntityManager $entityManager |
||
24 | * @param \stdClass $value |
||
25 | * @return Query |
||
26 | */ |
||
27 | 3 | public static function fromValue(EntityManager $entityManager, \stdClass $value) |
|
31 | |||
32 | /** |
||
33 | * @var EntityManager |
||
34 | */ |
||
35 | protected $entityManager; |
||
36 | |||
37 | /** |
||
38 | * @var \stdClass |
||
39 | */ |
||
40 | protected $source; |
||
41 | |||
42 | /** |
||
43 | * @var QueryFacet[]|ArrayCollection |
||
44 | */ |
||
45 | protected $facets; |
||
46 | |||
47 | /** |
||
48 | * @var QuerySuggestion[]|ArrayCollection |
||
49 | */ |
||
50 | protected $suggestions; |
||
51 | |||
52 | /** |
||
53 | * @var Result|null |
||
54 | */ |
||
55 | protected $results; |
||
56 | |||
57 | /** |
||
58 | * @param EntityManager $entityManager |
||
59 | * @param \stdClass $source |
||
60 | */ |
||
61 | 3 | public function __construct(EntityManager $entityManager, \stdClass $source) |
|
66 | |||
67 | /** |
||
68 | * @return \stdClass |
||
69 | */ |
||
70 | public function getRawData() |
||
74 | |||
75 | /** |
||
76 | * The offset start |
||
77 | * |
||
78 | * @return integer |
||
79 | */ |
||
80 | 1 | public function getOffsetStart() |
|
84 | |||
85 | /** |
||
86 | * The number item to retrieve |
||
87 | * |
||
88 | * @return integer |
||
89 | */ |
||
90 | 1 | public function getPerPage() |
|
94 | |||
95 | /** |
||
96 | * Get the total result |
||
97 | * |
||
98 | * @return integer |
||
99 | */ |
||
100 | 1 | public function getTotalResults() |
|
104 | |||
105 | /** |
||
106 | * Get errors as string |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | 1 | public function getError() |
|
114 | |||
115 | /** |
||
116 | * Get warnings as string |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | 1 | public function getWarning() |
|
124 | |||
125 | /** |
||
126 | * Get the query time |
||
127 | * |
||
128 | * @return float |
||
129 | */ |
||
130 | 1 | public function getQueryTime() |
|
134 | |||
135 | /** |
||
136 | * Get search indexes |
||
137 | * |
||
138 | * @return string |
||
139 | */ |
||
140 | 1 | public function getSearchIndexes() |
|
144 | |||
145 | /** |
||
146 | * Get the query string |
||
147 | * |
||
148 | * @return string |
||
149 | */ |
||
150 | 1 | public function getQuery() |
|
154 | |||
155 | /** |
||
156 | * Get query suggestions as a collection of QuerySuggestion |
||
157 | * objects |
||
158 | * |
||
159 | * @return ArrayCollection |
||
160 | */ |
||
161 | 1 | public function getSuggestions() |
|
171 | |||
172 | /** |
||
173 | * @return ArrayCollection|QueryFacet[] |
||
174 | */ |
||
175 | public function getFacets() |
||
183 | |||
184 | /** |
||
185 | * |
||
186 | * @return Result |
||
187 | */ |
||
188 | 3 | public function getResults() |
|
192 | |||
193 | /** |
||
194 | * Set or override value in protected object 'source' (\stdClass type) |
||
195 | * |
||
196 | * @param $pKey string |
||
197 | * @param $pValue mixed |
||
198 | */ |
||
199 | public function setSourceEntry($pKey, $pValue) |
||
203 | } |
||
204 |