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 | 1 | ||
75 | /** |
||
76 | * The offset start |
||
77 | * |
||
78 | * @return integer |
||
79 | */ |
||
80 | public function getOffsetStart() |
||
84 | 1 | ||
85 | /** |
||
86 | * The number item to retrieve |
||
87 | * |
||
88 | * @return integer |
||
89 | */ |
||
90 | public function getPerPage() |
||
94 | 1 | ||
95 | /** |
||
96 | * Get the total result |
||
97 | * |
||
98 | * @return integer |
||
99 | */ |
||
100 | public function getTotalResults() |
||
104 | 1 | ||
105 | /** |
||
106 | * Get errors as string |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getError() |
||
114 | 1 | ||
115 | /** |
||
116 | * Get warnings as string |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | public function getWarning() |
||
124 | 1 | ||
125 | /** |
||
126 | * Get the query time |
||
127 | * |
||
128 | * @return float |
||
129 | */ |
||
130 | public function getQueryTime() |
||
134 | 1 | ||
135 | /** |
||
136 | * Get search indexes |
||
137 | * |
||
138 | * @return string |
||
139 | */ |
||
140 | public function getSearchIndexes() |
||
144 | 1 | ||
145 | /** |
||
146 | * Get the query string |
||
147 | * |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getQuery() |
||
154 | |||
155 | 1 | /** |
|
156 | * Get query suggestions as a collection of QuerySuggestion |
||
157 | * objects |
||
158 | * |
||
159 | 1 | * @return ArrayCollection |
|
160 | 1 | */ |
|
161 | 1 | public function getSuggestions() |
|
171 | |||
172 | /** |
||
173 | * @return ArrayCollection|QueryFacet[] |
||
174 | */ |
||
175 | public function getFacets() |
||
183 | |||
184 | /** |
||
185 | * |
||
186 | * @return Result |
||
187 | */ |
||
188 | public function getResults() |
||
192 | } |
||
193 |