1 | <?php |
||
11 | class Rotation extends Combinatorics implements IteratorInterface |
||
12 | { |
||
13 | /** |
||
14 | * The key. |
||
15 | * |
||
16 | * @var int |
||
17 | */ |
||
18 | protected $key = 0; |
||
19 | |||
20 | /** |
||
21 | * A copy of the original data. |
||
22 | * |
||
23 | * @var mixed[] |
||
24 | */ |
||
25 | protected $rotation; |
||
26 | |||
27 | /** |
||
28 | * Rotation constructor. |
||
29 | * |
||
30 | * @param array $dataset |
||
31 | * The dataset |
||
32 | */ |
||
33 | 5 | public function __construct(array $dataset = []) |
|
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | 5 | public function current() |
|
46 | |||
47 | /** |
||
48 | * Compute the next value of the Iterator. |
||
49 | * |
||
50 | * @param int $offset |
||
51 | * The offset |
||
52 | */ |
||
53 | 5 | public function next($offset = 1) |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 5 | public function rewind() |
|
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function valid() |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 5 | public function count() |
|
82 | } |
||
83 |