1 | <?php |
||
13 | class ColumnsSummary |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @var DataGrid |
||
18 | */ |
||
19 | protected $datagrid; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $summary; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $format = []; |
||
30 | |||
31 | |||
32 | /** |
||
33 | * @param DataGrid $datagrid |
||
34 | * @param array $columns |
||
35 | */ |
||
36 | public function __construct(DataGrid $datagrid, array $columns) |
||
52 | |||
53 | |||
54 | /** |
||
55 | * @param Row $row |
||
56 | */ |
||
57 | public function add(Row $row) |
||
66 | |||
67 | |||
68 | /** |
||
69 | * @param string $key |
||
70 | * @return mixed |
||
71 | */ |
||
72 | public function render($key) |
||
85 | |||
86 | |||
87 | /** |
||
88 | * Set number format |
||
89 | * @param string $key |
||
90 | * @param int $decimals |
||
91 | * @param string $dec_point |
||
92 | * @param string $thousands_sep |
||
93 | */ |
||
94 | public function setFormat($key, $decimals = 0, $dec_point = '.', $thousands_sep = ' ') |
||
100 | |||
101 | |||
102 | /** |
||
103 | * @param array $columns |
||
104 | * @return bool |
||
105 | */ |
||
106 | public function someColumnsExist(array $columns) |
||
116 | |||
117 | } |
||
118 |