1 | <?php |
||
18 | class MultiComparator extends Comparator |
||
19 | { |
||
20 | /** |
||
21 | * @var ComparatorInterface |
||
22 | */ |
||
23 | protected $firstComparator; |
||
24 | |||
25 | /** |
||
26 | * @var ComparatorInterface |
||
27 | */ |
||
28 | protected $secondComparator; |
||
29 | |||
30 | /** |
||
31 | * @param callable $firstComparator |
||
32 | * @param callable $secondComparator |
||
33 | */ |
||
34 | public function __construct(callable $firstComparator, callable $secondComparator) |
||
39 | |||
40 | /** |
||
41 | * @return \Cubiche\Core\Comparable\ComparatorInterface |
||
42 | */ |
||
43 | public function firstComparator() |
||
47 | |||
48 | /** |
||
49 | * @return \Cubiche\Core\Comparable\ComparatorInterface |
||
50 | */ |
||
51 | public function secondComparator() |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function compare($a, $b) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function reverse() |
||
73 | } |
||
74 |