1 | <?php |
||
18 | class ChainSearch implements SearcherInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var CellCollectionInterface |
||
22 | */ |
||
23 | private $cellCollection; |
||
24 | |||
25 | /** |
||
26 | * @param CellCollectionInterface $cellCollection |
||
27 | */ |
||
28 | 8 | public function __construct(CellCollectionInterface $cellCollection) |
|
32 | |||
33 | /** |
||
34 | * Will perform multiple sub-searches. |
||
35 | * Results from first search will be transformed and passed as CriteriaCollection |
||
36 | * to another sub-search. |
||
37 | * Whole process will return collection of results from each sub-search. |
||
38 | * |
||
39 | * @param CriteriaCollectionInterface $criteriaCollection |
||
40 | * |
||
41 | * @return ResultCollection |
||
42 | */ |
||
43 | 8 | public function search( |
|
68 | |||
69 | /** |
||
70 | * If $cell has transformer then it will be used to return new criteria. |
||
71 | * If not old criteria will be returned. |
||
72 | * |
||
73 | * @param CellInterface $cell |
||
74 | * @param CriteriaCollectionInterface $criteria |
||
75 | * @param mixed $results |
||
76 | * |
||
77 | * @return CriteriaCollectionInterface |
||
78 | */ |
||
79 | 6 | private function getNewCriteria( |
|
92 | } |
||
93 |