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