1 | <?php |
||
17 | class OffsetAdapter |
||
18 | { |
||
19 | /** |
||
20 | * @var SourceInterface |
||
21 | */ |
||
22 | protected $source; |
||
23 | |||
24 | public function __construct(SourceInterface $source) |
||
28 | |||
29 | /** |
||
30 | * @param int $offset |
||
31 | * @param int $limit |
||
32 | * @param int $nowCount |
||
33 | * |
||
34 | * @throws \LogicException |
||
35 | * |
||
36 | * @return \SomeWork\OffsetPage\OffsetResult |
||
37 | */ |
||
38 | public function execute($offset, $limit, $nowCount = 0) |
||
42 | |||
43 | /** |
||
44 | * @param $offset |
||
45 | * @param $limit |
||
46 | * @param $nowCount |
||
47 | * |
||
48 | * @throws \LogicException |
||
49 | * |
||
50 | * @return \Generator |
||
51 | */ |
||
52 | protected function logic($offset, $limit, $nowCount) |
||
67 | } |
||
68 |