1 | <?php |
||
32 | class NumericCellRenderer implements RenderCellInterface, FormatterAwareInterface |
||
33 | { |
||
34 | use FormatterAwareTrait; |
||
35 | |||
36 | protected $data; |
||
37 | protected $renderedColumns; |
||
38 | protected $widths = []; |
||
39 | |||
40 | /** |
||
41 | * NumericCellRenderer constructor |
||
42 | */ |
||
43 | public function __construct($data, $renderedColumns) |
||
48 | |||
49 | /** |
||
50 | * @inheritdoc |
||
51 | */ |
||
52 | public function renderCell($key, $cellData, FormatterOptions $options, $rowData) |
||
62 | |||
63 | /** |
||
64 | * Right-justify the cell data. |
||
65 | */ |
||
66 | protected function justifyCellData($key, $cellData) |
||
70 | |||
71 | /** |
||
72 | * Determine if this format is to be formatted. |
||
73 | */ |
||
74 | protected function isRenderedFormat(FormatterOptions $options) |
||
78 | |||
79 | /** |
||
80 | * Determine if this is a column that should be formatted. |
||
81 | */ |
||
82 | protected function isRenderedColumn($key) |
||
86 | |||
87 | /** |
||
88 | * Ignore cell data that should not be formatted. |
||
89 | */ |
||
90 | protected function isRenderedData($cellData) |
||
94 | |||
95 | /** |
||
96 | * Format the cell data. |
||
97 | */ |
||
98 | protected function formatCellData($cellData) |
||
102 | |||
103 | /** |
||
104 | * This formatter only works with columns whose columns are strings. |
||
105 | * To use this formatter for another purpose, override this method |
||
106 | * to ensure that the cell data is a string before it is formatted. |
||
107 | */ |
||
108 | protected function convertCellDataToString($cellData) |
||
112 | |||
113 | /** |
||
114 | * Get the cached column width for the provided key. |
||
115 | */ |
||
116 | protected function columnWidth($key) |
||
123 | |||
124 | /** |
||
125 | * Using the cached table data, calculate the largest width |
||
126 | * for the data in the table for use when right-justifying. |
||
127 | */ |
||
128 | protected function calculateColumnWidth($key) |
||
137 | } |
||
138 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.