1 | <?php |
||
11 | class ArraySet implements \IteratorAggregate, DatasetInterface { |
||
|
|||
12 | use DatasetTrait; |
||
13 | |||
14 | private $data; |
||
15 | |||
16 | private $toSort = false; |
||
17 | |||
18 | /** |
||
19 | * Construct a new {@link ArraySet} object. |
||
20 | * |
||
21 | * @param array|\Traversable $data The initial data in the |
||
22 | */ |
||
23 | 4 | public function __construct($data = []) { |
|
26 | |||
27 | 2 | protected function sortData() { |
|
52 | |||
53 | /** |
||
54 | * Get the underlying data array. |
||
55 | * |
||
56 | * @return array Returns the data. |
||
57 | */ |
||
58 | 3 | public function getData() { |
|
69 | |||
70 | /** |
||
71 | * Set the underlying data array. |
||
72 | * |
||
73 | * @param array|\Traversable $data |
||
74 | * @return $this |
||
75 | */ |
||
76 | 4 | public function setData($data) { |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | 2 | public function setOrder(...$columns) { |
|
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | 1 | public function count() { |
|
118 | } |
||
119 |