1 | <?php |
||
17 | class TransformedFinder implements PaginatedFinderInterface |
||
18 | { |
||
19 | protected $searchable; |
||
20 | protected $transformer; |
||
21 | |||
22 | /** |
||
23 | * @param SearchableInterface $searchable |
||
24 | * @param ElasticaToModelTransformerInterface $transformer |
||
25 | */ |
||
26 | 8 | public function __construct(SearchableInterface $searchable, ElasticaToModelTransformerInterface $transformer) |
|
27 | { |
||
28 | 8 | $this->searchable = $searchable; |
|
29 | 8 | $this->transformer = $transformer; |
|
30 | 8 | } |
|
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 1 | public function find($query, $limit = null, $options = array()) |
|
36 | { |
||
37 | 1 | $results = $this->search($query, $limit, $options); |
|
38 | |||
39 | 1 | return $this->transformer->transform($results); |
|
40 | } |
||
41 | |||
42 | 1 | public function findHybrid($query, $limit = null, $options = array()) |
|
48 | |||
49 | /** |
||
50 | * Find documents similar to one with passed id. |
||
51 | * |
||
52 | * @param integer $id |
||
53 | * @param array $params |
||
54 | * @param array $query |
||
55 | * |
||
56 | * @return array of model objects |
||
57 | **/ |
||
58 | 1 | public function moreLikeThis($id, $params = array(), $query = array()) |
|
65 | |||
66 | /** |
||
67 | * @param $query |
||
68 | * @param null|int $limit |
||
69 | * @param array $options |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | 1 | protected function search($query, $limit = null, $options = array()) |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | 1 | public function findPaginated($query, $options = array()) |
|
88 | { |
||
89 | 1 | $queryObject = Query::create($query); |
|
90 | 1 | $paginatorAdapter = $this->createPaginatorAdapter($queryObject, $options); |
|
91 | |||
92 | 1 | return new Pagerfanta(new FantaPaginatorAdapter($paginatorAdapter)); |
|
93 | } |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | 2 | public function createPaginatorAdapter($query, $options = array()) |
|
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | 1 | public function createHybridPaginatorAdapter($query) |
|
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | public function createRawPaginatorAdapter($query) |
||
124 | } |
||
125 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.