1 | <?php |
||
5 | class Csv |
||
6 | { |
||
7 | protected $data; |
||
8 | |||
9 | 17 | public function __construct($array) |
|
13 | |||
14 | 14 | public function getData() |
|
18 | |||
19 | 1 | public function getRowCount() |
|
23 | |||
24 | public function first() |
||
28 | |||
29 | public function getKeys() |
||
33 | |||
34 | /** |
||
35 | * ->reKey allows you to reorganise the keys if they may be out of order as when we write to csv we do it in the order given |
||
36 | * e.g. if you build up an array, adding new columns/keys as you go down the multi levels, so long as you push them into the keys passed here or leave blank and use the first row |
||
37 | */ |
||
38 | public function reKey($keys = null) |
||
48 | |||
49 | 2 | public function appendRow($row) |
|
53 | |||
54 | 2 | public function prependRow($row) |
|
58 | |||
59 | 2 | public function columnExists($column) |
|
63 | |||
64 | 1 | public function mapColumn($column, $callback) |
|
73 | |||
74 | 1 | public function mapRows($callback) |
|
78 | |||
79 | 3 | public function filterRows($callback) |
|
83 | |||
84 | public function addColumn($column, $default='') |
||
88 | |||
89 | public function removeColumn($column) |
||
93 | |||
94 | public function removeRowByIndex($index) |
||
98 | |||
99 | public function removeRow($col, $val) |
||
103 | |||
104 | public function removeRows($rows) |
||
108 | |||
109 | public function reorderColumn($col, $index) |
||
113 | |||
114 | public function reorderColumns($rows) |
||
118 | |||
119 | public function reorderRow($col, $val, $index) |
||
123 | |||
124 | public function reorderRows($rows) |
||
128 | |||
129 | public function reorderRowsByColumn($column, $type='asc') |
||
133 | |||
134 | public function reorderRowsByColumns($columns) |
||
138 | |||
139 | 1 | public function removeDuplicates($column) |
|
150 | |||
151 | public function removeBlanks($column) |
||
160 | } |
||
161 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.