1 | <?php |
||
27 | class TransformedFinder implements PaginatedFinderInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var SearchableInterface |
||
31 | */ |
||
32 | protected $searchable; |
||
33 | |||
34 | /** |
||
35 | * @var ElasticaToModelTransformerInterface |
||
36 | */ |
||
37 | protected $transformer; |
||
38 | |||
39 | /** |
||
40 | * @param SearchableInterface $searchable |
||
41 | * @param ElasticaToModelTransformerInterface $transformer |
||
42 | 8 | */ |
|
43 | public function __construct(SearchableInterface $searchable, ElasticaToModelTransformerInterface $transformer) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | 1 | */ |
|
52 | public function find($query, $limit = null, $options = []) |
||
58 | |||
59 | /** |
||
60 | * @param $query |
||
61 | * @param null|int $limit |
||
62 | * @param array $options |
||
63 | * |
||
64 | * @return array |
||
65 | 1 | */ |
|
66 | public function findHybrid($query, $limit = null, $options = []) |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | 1 | */ |
|
76 | public function findPaginated($query, $options = []) |
||
82 | |||
83 | /** |
||
84 | * Searches for query hybrid results and returns them wrapped in a paginator. |
||
85 | * |
||
86 | * @param mixed $query Can be a string, an array or an \Elastica\Query object |
||
87 | * |
||
88 | * @return Pagerfanta paginated hybrid results |
||
89 | 1 | */ |
|
90 | public function findHybridPaginated($query) |
||
96 | |||
97 | /** |
||
98 | * {@inheritdoc} |
||
99 | 2 | */ |
|
100 | public function createPaginatorAdapter($query, $options = []) |
||
106 | |||
107 | public function createScrollPaginatorAdapter($query, $options = []) |
||
113 | 2 | ||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function createHybridPaginatorAdapter($query) |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function createRawPaginatorAdapter($query, $options = []) |
||
133 | 1 | ||
134 | /** |
||
135 | 1 | * @param $query |
|
136 | 1 | * @param null|int $limit |
|
137 | 1 | * @param array $options |
|
138 | * |
||
139 | 1 | * @return array |
|
140 | */ |
||
141 | 1 | protected function search($query, $limit = null, $options = []) |
|
151 | } |
||
152 |