1 | <?php |
||
26 | class TransformedFinder implements PaginatedFinderInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var SearchableInterface |
||
30 | */ |
||
31 | protected $searchable; |
||
32 | |||
33 | /** |
||
34 | * @var ElasticaToModelTransformerInterface |
||
35 | */ |
||
36 | protected $transformer; |
||
37 | |||
38 | /** |
||
39 | * @param SearchableInterface $searchable |
||
40 | * @param ElasticaToModelTransformerInterface $transformer |
||
41 | */ |
||
42 | 9 | public function __construct(SearchableInterface $searchable, ElasticaToModelTransformerInterface $transformer) |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 1 | public function find($query, $limit = null, $options = []) |
|
57 | |||
58 | /** |
||
59 | * @param $query |
||
60 | * @param null|int $limit |
||
61 | * @param array $options |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | 1 | public function findHybrid($query, $limit = null, $options = []) |
|
71 | |||
72 | /** |
||
73 | * @param $query |
||
74 | * @param null|int $limit |
||
75 | * @param array $options |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | 1 | public function findRaw($query, ?int $limit = null, array $options = []): array |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | 1 | public function findPaginated($query, $options = []) |
|
93 | |||
94 | /** |
||
95 | * Searches for query hybrid results and returns them wrapped in a paginator. |
||
96 | * |
||
97 | * @param mixed $query Can be a string, an array or an \Elastica\Query object |
||
98 | * |
||
99 | * @return Pagerfanta paginated hybrid results |
||
100 | */ |
||
101 | 1 | public function findHybridPaginated($query) |
|
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | 2 | public function createPaginatorAdapter($query, $options = []) |
|
117 | |||
118 | /** |
||
119 | * {@inheritdoc} |
||
120 | */ |
||
121 | 2 | public function createHybridPaginatorAdapter($query) |
|
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | public function createRawPaginatorAdapter($query, $options = []) |
||
137 | |||
138 | /** |
||
139 | * @param $query |
||
140 | * @param null|int $limit |
||
141 | * @param array $options |
||
142 | * |
||
143 | * @return array |
||
144 | */ |
||
145 | 1 | protected function search($query, $limit = null, $options = []) |
|
155 | } |
||
156 |