1 | <?php |
||
8 | class Data |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | private $arrayToDataTable; |
||
14 | |||
15 | /** |
||
16 | * @var bool |
||
17 | */ |
||
18 | private $firstRowIsData; |
||
19 | |||
20 | /** |
||
21 | * Data constructor. |
||
22 | */ |
||
23 | public function __construct() |
||
28 | |||
29 | /** |
||
30 | * @return array |
||
31 | */ |
||
32 | public function getArrayToDataTable() |
||
36 | |||
37 | /** |
||
38 | * This method takes in a two-dimensional array. The data types of each column are interpreted automatically from |
||
39 | * the data given. If a cell has no value, specify a null or empty value as appropriate. Column data types can also |
||
40 | * be specified using the object literal notation in the first row (the column header row) of the array |
||
41 | * (i.e. ['label' => 'Start Date', 'type' => 'date']). Optional data roles may be used as well, but they must be |
||
42 | 2 | * defined explicitly using object literal notation. Object literal notation may also be used for any cell, |
|
43 | * allowing you to define Cell Objects). |
||
44 | 2 | * |
|
45 | 2 | * @param array $arrayToDataTable a two-dimensional array, where each row represents a row in the data table |
|
46 | 2 | * @param bool $firstRowIsData if firstRowIsData is false (the default), the first row will be interpreted |
|
47 | * as header labels |
||
48 | */ |
||
49 | public function setArrayToDataTable($arrayToDataTable, $firstRowIsData = false) |
||
54 | |||
55 | /** |
||
56 | * @return bool |
||
57 | 2 | */ |
|
58 | public function isFirstRowIsData() |
||
62 | } |
||
63 |