@@ -77,171 +77,171 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | protected function initializeMappings() |
| 79 | 79 | { |
| 80 | - $this->mappings['autoFilter'] = function ($value) { |
|
| 80 | + $this->mappings['autoFilter'] = function($value) { |
|
| 81 | 81 | $this->object->setAutoFilter($value); |
| 82 | 82 | }; |
| 83 | 83 | $this->mappings['columnDimension']['__multi'] = true; |
| 84 | - $this->mappings['columnDimension']['__object'] = function ($key = 'default') { |
|
| 84 | + $this->mappings['columnDimension']['__object'] = function($key = 'default') { |
|
| 85 | 85 | return $key === 'default' ? $this->object->getDefaultColumnDimension() : $this->object->getColumnDimension($key); |
| 86 | 86 | }; |
| 87 | - $this->mappings['columnDimension']['autoSize'] = function ($key, $value) { |
|
| 87 | + $this->mappings['columnDimension']['autoSize'] = function($key, $value) { |
|
| 88 | 88 | $this->mappings['columnDimension']['__object']($key)->setAutoSize($value); |
| 89 | 89 | }; |
| 90 | - $this->mappings['columnDimension']['collapsed'] = function ($key, $value) { |
|
| 90 | + $this->mappings['columnDimension']['collapsed'] = function($key, $value) { |
|
| 91 | 91 | $this->mappings['columnDimension']['__object']($key)->setCollapsed($value); |
| 92 | 92 | }; |
| 93 | - $this->mappings['columnDimension']['columnIndex'] = function ($key, $value) { |
|
| 93 | + $this->mappings['columnDimension']['columnIndex'] = function($key, $value) { |
|
| 94 | 94 | $this->mappings['columnDimension']['__object']($key)->setColumnIndex($value); |
| 95 | 95 | }; |
| 96 | - $this->mappings['columnDimension']['outlineLevel'] = function ($key, $value) { |
|
| 96 | + $this->mappings['columnDimension']['outlineLevel'] = function($key, $value) { |
|
| 97 | 97 | $this->mappings['columnDimension']['__object']($key)->setOutlineLevel($value); |
| 98 | 98 | }; |
| 99 | - $this->mappings['columnDimension']['visible'] = function ($key, $value) { |
|
| 99 | + $this->mappings['columnDimension']['visible'] = function($key, $value) { |
|
| 100 | 100 | $this->mappings['columnDimension']['__object']($key)->setVisible($value); |
| 101 | 101 | }; |
| 102 | - $this->mappings['columnDimension']['width'] = function ($key, $value) { |
|
| 102 | + $this->mappings['columnDimension']['width'] = function($key, $value) { |
|
| 103 | 103 | $this->mappings['columnDimension']['__object']($key)->setWidth($value); |
| 104 | 104 | }; |
| 105 | - $this->mappings['columnDimension']['xfIndex'] = function ($key, $value) { |
|
| 105 | + $this->mappings['columnDimension']['xfIndex'] = function($key, $value) { |
|
| 106 | 106 | $this->mappings['columnDimension']['__object']($key)->setXfIndex($value); |
| 107 | 107 | }; |
| 108 | - $this->mappings['pageMargins']['top'] = function ($value) { |
|
| 108 | + $this->mappings['pageMargins']['top'] = function($value) { |
|
| 109 | 109 | $this->object->getPageMargins()->setTop($value); |
| 110 | 110 | }; |
| 111 | - $this->mappings['pageMargins']['bottom'] = function ($value) { |
|
| 111 | + $this->mappings['pageMargins']['bottom'] = function($value) { |
|
| 112 | 112 | $this->object->getPageMargins()->setBottom($value); |
| 113 | 113 | }; |
| 114 | - $this->mappings['pageMargins']['left'] = function ($value) { |
|
| 114 | + $this->mappings['pageMargins']['left'] = function($value) { |
|
| 115 | 115 | $this->object->getPageMargins()->setLeft($value); |
| 116 | 116 | }; |
| 117 | - $this->mappings['pageMargins']['right'] = function ($value) { |
|
| 117 | + $this->mappings['pageMargins']['right'] = function($value) { |
|
| 118 | 118 | $this->object->getPageMargins()->setRight($value); |
| 119 | 119 | }; |
| 120 | - $this->mappings['pageMargins']['header'] = function ($value) { |
|
| 120 | + $this->mappings['pageMargins']['header'] = function($value) { |
|
| 121 | 121 | $this->object->getPageMargins()->setHeader($value); |
| 122 | 122 | }; |
| 123 | - $this->mappings['pageMargins']['footer'] = function ($value) { |
|
| 123 | + $this->mappings['pageMargins']['footer'] = function($value) { |
|
| 124 | 124 | $this->object->getPageMargins()->setFooter($value); |
| 125 | 125 | }; |
| 126 | - $this->mappings['pageSetup']['fitToHeight'] = function ($value) { |
|
| 126 | + $this->mappings['pageSetup']['fitToHeight'] = function($value) { |
|
| 127 | 127 | $this->object->getPageSetup()->setFitToHeight($value); |
| 128 | 128 | }; |
| 129 | - $this->mappings['pageSetup']['fitToPage'] = function ($value) { |
|
| 129 | + $this->mappings['pageSetup']['fitToPage'] = function($value) { |
|
| 130 | 130 | $this->object->getPageSetup()->setFitToPage($value); |
| 131 | 131 | }; |
| 132 | - $this->mappings['pageSetup']['fitToWidth'] = function ($value) { |
|
| 132 | + $this->mappings['pageSetup']['fitToWidth'] = function($value) { |
|
| 133 | 133 | $this->object->getPageSetup()->setFitToWidth($value); |
| 134 | 134 | }; |
| 135 | - $this->mappings['pageSetup']['horizontalCentered'] = function ($value) { |
|
| 135 | + $this->mappings['pageSetup']['horizontalCentered'] = function($value) { |
|
| 136 | 136 | $this->object->getPageSetup()->setHorizontalCentered($value); |
| 137 | 137 | }; |
| 138 | - $this->mappings['pageSetup']['orientation'] = function ($value) { |
|
| 138 | + $this->mappings['pageSetup']['orientation'] = function($value) { |
|
| 139 | 139 | $this->object->getPageSetup()->setOrientation($value); |
| 140 | 140 | }; |
| 141 | - $this->mappings['pageSetup']['paperSize'] = function ($value) { |
|
| 141 | + $this->mappings['pageSetup']['paperSize'] = function($value) { |
|
| 142 | 142 | $this->object->getPageSetup()->setPaperSize($value); |
| 143 | 143 | }; |
| 144 | - $this->mappings['pageSetup']['printArea'] = function ($value) { |
|
| 144 | + $this->mappings['pageSetup']['printArea'] = function($value) { |
|
| 145 | 145 | $this->object->getPageSetup()->setPrintArea($value); |
| 146 | 146 | }; |
| 147 | - $this->mappings['pageSetup']['scale'] = function ($value) { |
|
| 147 | + $this->mappings['pageSetup']['scale'] = function($value) { |
|
| 148 | 148 | $this->object->getPageSetup()->setScale($value); |
| 149 | 149 | }; |
| 150 | - $this->mappings['pageSetup']['verticalCentered'] = function ($value) { |
|
| 150 | + $this->mappings['pageSetup']['verticalCentered'] = function($value) { |
|
| 151 | 151 | $this->object->getPageSetup()->setVerticalCentered($value); |
| 152 | 152 | }; |
| 153 | - $this->mappings['printGridlines'] = function ($value) { |
|
| 153 | + $this->mappings['printGridlines'] = function($value) { |
|
| 154 | 154 | $this->object->setPrintGridlines($value); |
| 155 | 155 | }; |
| 156 | - $this->mappings['protection']['autoFilter'] = function ($value) { |
|
| 156 | + $this->mappings['protection']['autoFilter'] = function($value) { |
|
| 157 | 157 | $this->object->getProtection()->setAutoFilter($value); |
| 158 | 158 | }; |
| 159 | - $this->mappings['protection']['deleteColumns'] = function ($value) { |
|
| 159 | + $this->mappings['protection']['deleteColumns'] = function($value) { |
|
| 160 | 160 | $this->object->getProtection()->setDeleteColumns($value); |
| 161 | 161 | }; |
| 162 | - $this->mappings['protection']['deleteRows'] = function ($value) { |
|
| 162 | + $this->mappings['protection']['deleteRows'] = function($value) { |
|
| 163 | 163 | $this->object->getProtection()->setDeleteRows($value); |
| 164 | 164 | }; |
| 165 | - $this->mappings['protection']['formatCells'] = function ($value) { |
|
| 165 | + $this->mappings['protection']['formatCells'] = function($value) { |
|
| 166 | 166 | $this->object->getProtection()->setFormatCells($value); |
| 167 | 167 | }; |
| 168 | - $this->mappings['protection']['formatColumns'] = function ($value) { |
|
| 168 | + $this->mappings['protection']['formatColumns'] = function($value) { |
|
| 169 | 169 | $this->object->getProtection()->setFormatColumns($value); |
| 170 | 170 | }; |
| 171 | - $this->mappings['protection']['formatRows'] = function ($value) { |
|
| 171 | + $this->mappings['protection']['formatRows'] = function($value) { |
|
| 172 | 172 | $this->object->getProtection()->setFormatRows($value); |
| 173 | 173 | }; |
| 174 | - $this->mappings['protection']['insertColumns'] = function ($value) { |
|
| 174 | + $this->mappings['protection']['insertColumns'] = function($value) { |
|
| 175 | 175 | $this->object->getProtection()->setInsertColumns($value); |
| 176 | 176 | }; |
| 177 | - $this->mappings['protection']['insertHyperlinks'] = function ($value) { |
|
| 177 | + $this->mappings['protection']['insertHyperlinks'] = function($value) { |
|
| 178 | 178 | $this->object->getProtection()->setInsertHyperlinks($value); |
| 179 | 179 | }; |
| 180 | - $this->mappings['protection']['insertRows'] = function ($value) { |
|
| 180 | + $this->mappings['protection']['insertRows'] = function($value) { |
|
| 181 | 181 | $this->object->getProtection()->setInsertRows($value); |
| 182 | 182 | }; |
| 183 | - $this->mappings['protection']['objects'] = function ($value) { |
|
| 183 | + $this->mappings['protection']['objects'] = function($value) { |
|
| 184 | 184 | $this->object->getProtection()->setObjects($value); |
| 185 | 185 | }; |
| 186 | - $this->mappings['protection']['password'] = function ($value) { |
|
| 186 | + $this->mappings['protection']['password'] = function($value) { |
|
| 187 | 187 | $this->object->getProtection()->setPassword($value); |
| 188 | 188 | }; |
| 189 | - $this->mappings['protection']['pivotTables'] = function ($value) { |
|
| 189 | + $this->mappings['protection']['pivotTables'] = function($value) { |
|
| 190 | 190 | $this->object->getProtection()->setPivotTables($value); |
| 191 | 191 | }; |
| 192 | - $this->mappings['protection']['scenarios'] = function ($value) { |
|
| 192 | + $this->mappings['protection']['scenarios'] = function($value) { |
|
| 193 | 193 | $this->object->getProtection()->setScenarios($value); |
| 194 | 194 | }; |
| 195 | - $this->mappings['protection']['selectLockedCells'] = function ($value) { |
|
| 195 | + $this->mappings['protection']['selectLockedCells'] = function($value) { |
|
| 196 | 196 | $this->object->getProtection()->setSelectLockedCells($value); |
| 197 | 197 | }; |
| 198 | - $this->mappings['protection']['selectUnlockedCells'] = function ($value) { |
|
| 198 | + $this->mappings['protection']['selectUnlockedCells'] = function($value) { |
|
| 199 | 199 | $this->object->getProtection()->setSelectUnlockedCells($value); |
| 200 | 200 | }; |
| 201 | - $this->mappings['protection']['sheet'] = function ($value) { |
|
| 201 | + $this->mappings['protection']['sheet'] = function($value) { |
|
| 202 | 202 | $this->object->getProtection()->setSheet($value); |
| 203 | 203 | }; |
| 204 | - $this->mappings['protection']['sort'] = function ($value) { |
|
| 204 | + $this->mappings['protection']['sort'] = function($value) { |
|
| 205 | 205 | $this->object->getProtection()->setSort($value); |
| 206 | 206 | }; |
| 207 | - $this->mappings['rightToLeft'] = function ($value) { |
|
| 207 | + $this->mappings['rightToLeft'] = function($value) { |
|
| 208 | 208 | $this->object->setRightToLeft($value); |
| 209 | 209 | }; |
| 210 | 210 | $this->mappings['rowDimension']['__multi'] = true; |
| 211 | - $this->mappings['rowDimension']['__object'] = function ($key) { |
|
| 211 | + $this->mappings['rowDimension']['__object'] = function($key) { |
|
| 212 | 212 | return $key === 'default' ? $this->object->getDefaultRowDimension() : $this->object->getRowDimension($key); |
| 213 | 213 | }; |
| 214 | - $this->mappings['rowDimension']['collapsed'] = function ($key, $value) { |
|
| 214 | + $this->mappings['rowDimension']['collapsed'] = function($key, $value) { |
|
| 215 | 215 | $this->mappings['rowDimension']['__object']($key)->setCollapsed($value); |
| 216 | 216 | }; |
| 217 | - $this->mappings['rowDimension']['outlineLevel'] = function ($key, $value) { |
|
| 217 | + $this->mappings['rowDimension']['outlineLevel'] = function($key, $value) { |
|
| 218 | 218 | $this->mappings['rowDimension']['__object']($key)->setOutlineLevel($value); |
| 219 | 219 | }; |
| 220 | - $this->mappings['rowDimension']['rowHeight'] = function ($key, $value) { |
|
| 220 | + $this->mappings['rowDimension']['rowHeight'] = function($key, $value) { |
|
| 221 | 221 | $this->mappings['rowDimension']['__object']($key)->setRowHeight($value); |
| 222 | 222 | }; |
| 223 | - $this->mappings['rowDimension']['rowIndex'] = function ($key, $value) { |
|
| 223 | + $this->mappings['rowDimension']['rowIndex'] = function($key, $value) { |
|
| 224 | 224 | $this->mappings['rowDimension']['__object']($key)->setRowIndex($value); |
| 225 | 225 | }; |
| 226 | - $this->mappings['rowDimension']['visible'] = function ($key, $value) { |
|
| 226 | + $this->mappings['rowDimension']['visible'] = function($key, $value) { |
|
| 227 | 227 | $this->mappings['rowDimension']['__object']($key)->setVisible($value); |
| 228 | 228 | }; |
| 229 | - $this->mappings['rowDimension']['xfIndex'] = function ($key, $value) { |
|
| 229 | + $this->mappings['rowDimension']['xfIndex'] = function($key, $value) { |
|
| 230 | 230 | $this->mappings['rowDimension']['__object']($key)->setXfIndex($value); |
| 231 | 231 | }; |
| 232 | - $this->mappings['rowDimension']['zeroHeight'] = function ($key, $value) { |
|
| 232 | + $this->mappings['rowDimension']['zeroHeight'] = function($key, $value) { |
|
| 233 | 233 | $this->mappings['rowDimension']['__object']($key)->setZeroHeight($value); |
| 234 | 234 | }; |
| 235 | - $this->mappings['sheetState'] = function ($value) { |
|
| 235 | + $this->mappings['sheetState'] = function($value) { |
|
| 236 | 236 | $this->object->setSheetState($value); |
| 237 | 237 | }; |
| 238 | - $this->mappings['showGridlines'] = function ($value) { |
|
| 238 | + $this->mappings['showGridlines'] = function($value) { |
|
| 239 | 239 | $this->object->setShowGridlines($value); |
| 240 | 240 | }; |
| 241 | - $this->mappings['tabColor'] = function ($value) { |
|
| 241 | + $this->mappings['tabColor'] = function($value) { |
|
| 242 | 242 | $this->object->getTabColor()->setRGB($value); |
| 243 | 243 | }; |
| 244 | - $this->mappings['zoomScale'] = function ($value) { |
|
| 244 | + $this->mappings['zoomScale'] = function($value) { |
|
| 245 | 245 | $this->object->getSheetView()->setZoomScale($value); |
| 246 | 246 | }; |
| 247 | 247 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | */ |
| 254 | 254 | public function start($index, array $properties = null) |
| 255 | 255 | { |
| 256 | - if (is_int($index) && $index <$this->documentWrapper->getObject()->getSheetCount()) { |
|
| 256 | + if (is_int($index) && $index < $this->documentWrapper->getObject()->getSheetCount()) { |
|
| 257 | 257 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndex($index); |
| 258 | 258 | } elseif (is_string($index)) { |
| 259 | 259 | if (!$this->documentWrapper->getObject()->sheetNameExists($index)) { |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | $this->documentWrapper->getObject()->createSheet()->setTitle($index); |
| 262 | 262 | } |
| 263 | 263 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndexByName($index); |
| 264 | - } else { |
|
| 264 | + } else { |
|
| 265 | 265 | // create new sheet without a name |
| 266 | 266 | $this->documentWrapper->getObject()->createSheet(); |
| 267 | 267 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndex(0); |
@@ -77,171 +77,226 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | protected function initializeMappings() |
| 79 | 79 | { |
| 80 | - $this->mappings['autoFilter'] = function ($value) { |
|
| 80 | + $this->mappings['autoFilter'] = function ($value) |
|
| 81 | + { |
|
| 81 | 82 | $this->object->setAutoFilter($value); |
| 82 | 83 | }; |
| 83 | 84 | $this->mappings['columnDimension']['__multi'] = true; |
| 84 | - $this->mappings['columnDimension']['__object'] = function ($key = 'default') { |
|
| 85 | + $this->mappings['columnDimension']['__object'] = function ($key = 'default') |
|
| 86 | + { |
|
| 85 | 87 | return $key === 'default' ? $this->object->getDefaultColumnDimension() : $this->object->getColumnDimension($key); |
| 86 | 88 | }; |
| 87 | - $this->mappings['columnDimension']['autoSize'] = function ($key, $value) { |
|
| 89 | + $this->mappings['columnDimension']['autoSize'] = function ($key, $value) |
|
| 90 | + { |
|
| 88 | 91 | $this->mappings['columnDimension']['__object']($key)->setAutoSize($value); |
| 89 | 92 | }; |
| 90 | - $this->mappings['columnDimension']['collapsed'] = function ($key, $value) { |
|
| 93 | + $this->mappings['columnDimension']['collapsed'] = function ($key, $value) |
|
| 94 | + { |
|
| 91 | 95 | $this->mappings['columnDimension']['__object']($key)->setCollapsed($value); |
| 92 | 96 | }; |
| 93 | - $this->mappings['columnDimension']['columnIndex'] = function ($key, $value) { |
|
| 97 | + $this->mappings['columnDimension']['columnIndex'] = function ($key, $value) |
|
| 98 | + { |
|
| 94 | 99 | $this->mappings['columnDimension']['__object']($key)->setColumnIndex($value); |
| 95 | 100 | }; |
| 96 | - $this->mappings['columnDimension']['outlineLevel'] = function ($key, $value) { |
|
| 101 | + $this->mappings['columnDimension']['outlineLevel'] = function ($key, $value) |
|
| 102 | + { |
|
| 97 | 103 | $this->mappings['columnDimension']['__object']($key)->setOutlineLevel($value); |
| 98 | 104 | }; |
| 99 | - $this->mappings['columnDimension']['visible'] = function ($key, $value) { |
|
| 105 | + $this->mappings['columnDimension']['visible'] = function ($key, $value) |
|
| 106 | + { |
|
| 100 | 107 | $this->mappings['columnDimension']['__object']($key)->setVisible($value); |
| 101 | 108 | }; |
| 102 | - $this->mappings['columnDimension']['width'] = function ($key, $value) { |
|
| 109 | + $this->mappings['columnDimension']['width'] = function ($key, $value) |
|
| 110 | + { |
|
| 103 | 111 | $this->mappings['columnDimension']['__object']($key)->setWidth($value); |
| 104 | 112 | }; |
| 105 | - $this->mappings['columnDimension']['xfIndex'] = function ($key, $value) { |
|
| 113 | + $this->mappings['columnDimension']['xfIndex'] = function ($key, $value) |
|
| 114 | + { |
|
| 106 | 115 | $this->mappings['columnDimension']['__object']($key)->setXfIndex($value); |
| 107 | 116 | }; |
| 108 | - $this->mappings['pageMargins']['top'] = function ($value) { |
|
| 117 | + $this->mappings['pageMargins']['top'] = function ($value) |
|
| 118 | + { |
|
| 109 | 119 | $this->object->getPageMargins()->setTop($value); |
| 110 | 120 | }; |
| 111 | - $this->mappings['pageMargins']['bottom'] = function ($value) { |
|
| 121 | + $this->mappings['pageMargins']['bottom'] = function ($value) |
|
| 122 | + { |
|
| 112 | 123 | $this->object->getPageMargins()->setBottom($value); |
| 113 | 124 | }; |
| 114 | - $this->mappings['pageMargins']['left'] = function ($value) { |
|
| 125 | + $this->mappings['pageMargins']['left'] = function ($value) |
|
| 126 | + { |
|
| 115 | 127 | $this->object->getPageMargins()->setLeft($value); |
| 116 | 128 | }; |
| 117 | - $this->mappings['pageMargins']['right'] = function ($value) { |
|
| 129 | + $this->mappings['pageMargins']['right'] = function ($value) |
|
| 130 | + { |
|
| 118 | 131 | $this->object->getPageMargins()->setRight($value); |
| 119 | 132 | }; |
| 120 | - $this->mappings['pageMargins']['header'] = function ($value) { |
|
| 133 | + $this->mappings['pageMargins']['header'] = function ($value) |
|
| 134 | + { |
|
| 121 | 135 | $this->object->getPageMargins()->setHeader($value); |
| 122 | 136 | }; |
| 123 | - $this->mappings['pageMargins']['footer'] = function ($value) { |
|
| 137 | + $this->mappings['pageMargins']['footer'] = function ($value) |
|
| 138 | + { |
|
| 124 | 139 | $this->object->getPageMargins()->setFooter($value); |
| 125 | 140 | }; |
| 126 | - $this->mappings['pageSetup']['fitToHeight'] = function ($value) { |
|
| 141 | + $this->mappings['pageSetup']['fitToHeight'] = function ($value) |
|
| 142 | + { |
|
| 127 | 143 | $this->object->getPageSetup()->setFitToHeight($value); |
| 128 | 144 | }; |
| 129 | - $this->mappings['pageSetup']['fitToPage'] = function ($value) { |
|
| 145 | + $this->mappings['pageSetup']['fitToPage'] = function ($value) |
|
| 146 | + { |
|
| 130 | 147 | $this->object->getPageSetup()->setFitToPage($value); |
| 131 | 148 | }; |
| 132 | - $this->mappings['pageSetup']['fitToWidth'] = function ($value) { |
|
| 149 | + $this->mappings['pageSetup']['fitToWidth'] = function ($value) |
|
| 150 | + { |
|
| 133 | 151 | $this->object->getPageSetup()->setFitToWidth($value); |
| 134 | 152 | }; |
| 135 | - $this->mappings['pageSetup']['horizontalCentered'] = function ($value) { |
|
| 153 | + $this->mappings['pageSetup']['horizontalCentered'] = function ($value) |
|
| 154 | + { |
|
| 136 | 155 | $this->object->getPageSetup()->setHorizontalCentered($value); |
| 137 | 156 | }; |
| 138 | - $this->mappings['pageSetup']['orientation'] = function ($value) { |
|
| 157 | + $this->mappings['pageSetup']['orientation'] = function ($value) |
|
| 158 | + { |
|
| 139 | 159 | $this->object->getPageSetup()->setOrientation($value); |
| 140 | 160 | }; |
| 141 | - $this->mappings['pageSetup']['paperSize'] = function ($value) { |
|
| 161 | + $this->mappings['pageSetup']['paperSize'] = function ($value) |
|
| 162 | + { |
|
| 142 | 163 | $this->object->getPageSetup()->setPaperSize($value); |
| 143 | 164 | }; |
| 144 | - $this->mappings['pageSetup']['printArea'] = function ($value) { |
|
| 165 | + $this->mappings['pageSetup']['printArea'] = function ($value) |
|
| 166 | + { |
|
| 145 | 167 | $this->object->getPageSetup()->setPrintArea($value); |
| 146 | 168 | }; |
| 147 | - $this->mappings['pageSetup']['scale'] = function ($value) { |
|
| 169 | + $this->mappings['pageSetup']['scale'] = function ($value) |
|
| 170 | + { |
|
| 148 | 171 | $this->object->getPageSetup()->setScale($value); |
| 149 | 172 | }; |
| 150 | - $this->mappings['pageSetup']['verticalCentered'] = function ($value) { |
|
| 173 | + $this->mappings['pageSetup']['verticalCentered'] = function ($value) |
|
| 174 | + { |
|
| 151 | 175 | $this->object->getPageSetup()->setVerticalCentered($value); |
| 152 | 176 | }; |
| 153 | - $this->mappings['printGridlines'] = function ($value) { |
|
| 177 | + $this->mappings['printGridlines'] = function ($value) |
|
| 178 | + { |
|
| 154 | 179 | $this->object->setPrintGridlines($value); |
| 155 | 180 | }; |
| 156 | - $this->mappings['protection']['autoFilter'] = function ($value) { |
|
| 181 | + $this->mappings['protection']['autoFilter'] = function ($value) |
|
| 182 | + { |
|
| 157 | 183 | $this->object->getProtection()->setAutoFilter($value); |
| 158 | 184 | }; |
| 159 | - $this->mappings['protection']['deleteColumns'] = function ($value) { |
|
| 185 | + $this->mappings['protection']['deleteColumns'] = function ($value) |
|
| 186 | + { |
|
| 160 | 187 | $this->object->getProtection()->setDeleteColumns($value); |
| 161 | 188 | }; |
| 162 | - $this->mappings['protection']['deleteRows'] = function ($value) { |
|
| 189 | + $this->mappings['protection']['deleteRows'] = function ($value) |
|
| 190 | + { |
|
| 163 | 191 | $this->object->getProtection()->setDeleteRows($value); |
| 164 | 192 | }; |
| 165 | - $this->mappings['protection']['formatCells'] = function ($value) { |
|
| 193 | + $this->mappings['protection']['formatCells'] = function ($value) |
|
| 194 | + { |
|
| 166 | 195 | $this->object->getProtection()->setFormatCells($value); |
| 167 | 196 | }; |
| 168 | - $this->mappings['protection']['formatColumns'] = function ($value) { |
|
| 197 | + $this->mappings['protection']['formatColumns'] = function ($value) |
|
| 198 | + { |
|
| 169 | 199 | $this->object->getProtection()->setFormatColumns($value); |
| 170 | 200 | }; |
| 171 | - $this->mappings['protection']['formatRows'] = function ($value) { |
|
| 201 | + $this->mappings['protection']['formatRows'] = function ($value) |
|
| 202 | + { |
|
| 172 | 203 | $this->object->getProtection()->setFormatRows($value); |
| 173 | 204 | }; |
| 174 | - $this->mappings['protection']['insertColumns'] = function ($value) { |
|
| 205 | + $this->mappings['protection']['insertColumns'] = function ($value) |
|
| 206 | + { |
|
| 175 | 207 | $this->object->getProtection()->setInsertColumns($value); |
| 176 | 208 | }; |
| 177 | - $this->mappings['protection']['insertHyperlinks'] = function ($value) { |
|
| 209 | + $this->mappings['protection']['insertHyperlinks'] = function ($value) |
|
| 210 | + { |
|
| 178 | 211 | $this->object->getProtection()->setInsertHyperlinks($value); |
| 179 | 212 | }; |
| 180 | - $this->mappings['protection']['insertRows'] = function ($value) { |
|
| 213 | + $this->mappings['protection']['insertRows'] = function ($value) |
|
| 214 | + { |
|
| 181 | 215 | $this->object->getProtection()->setInsertRows($value); |
| 182 | 216 | }; |
| 183 | - $this->mappings['protection']['objects'] = function ($value) { |
|
| 217 | + $this->mappings['protection']['objects'] = function ($value) |
|
| 218 | + { |
|
| 184 | 219 | $this->object->getProtection()->setObjects($value); |
| 185 | 220 | }; |
| 186 | - $this->mappings['protection']['password'] = function ($value) { |
|
| 221 | + $this->mappings['protection']['password'] = function ($value) |
|
| 222 | + { |
|
| 187 | 223 | $this->object->getProtection()->setPassword($value); |
| 188 | 224 | }; |
| 189 | - $this->mappings['protection']['pivotTables'] = function ($value) { |
|
| 225 | + $this->mappings['protection']['pivotTables'] = function ($value) |
|
| 226 | + { |
|
| 190 | 227 | $this->object->getProtection()->setPivotTables($value); |
| 191 | 228 | }; |
| 192 | - $this->mappings['protection']['scenarios'] = function ($value) { |
|
| 229 | + $this->mappings['protection']['scenarios'] = function ($value) |
|
| 230 | + { |
|
| 193 | 231 | $this->object->getProtection()->setScenarios($value); |
| 194 | 232 | }; |
| 195 | - $this->mappings['protection']['selectLockedCells'] = function ($value) { |
|
| 233 | + $this->mappings['protection']['selectLockedCells'] = function ($value) |
|
| 234 | + { |
|
| 196 | 235 | $this->object->getProtection()->setSelectLockedCells($value); |
| 197 | 236 | }; |
| 198 | - $this->mappings['protection']['selectUnlockedCells'] = function ($value) { |
|
| 237 | + $this->mappings['protection']['selectUnlockedCells'] = function ($value) |
|
| 238 | + { |
|
| 199 | 239 | $this->object->getProtection()->setSelectUnlockedCells($value); |
| 200 | 240 | }; |
| 201 | - $this->mappings['protection']['sheet'] = function ($value) { |
|
| 241 | + $this->mappings['protection']['sheet'] = function ($value) |
|
| 242 | + { |
|
| 202 | 243 | $this->object->getProtection()->setSheet($value); |
| 203 | 244 | }; |
| 204 | - $this->mappings['protection']['sort'] = function ($value) { |
|
| 245 | + $this->mappings['protection']['sort'] = function ($value) |
|
| 246 | + { |
|
| 205 | 247 | $this->object->getProtection()->setSort($value); |
| 206 | 248 | }; |
| 207 | - $this->mappings['rightToLeft'] = function ($value) { |
|
| 249 | + $this->mappings['rightToLeft'] = function ($value) |
|
| 250 | + { |
|
| 208 | 251 | $this->object->setRightToLeft($value); |
| 209 | 252 | }; |
| 210 | 253 | $this->mappings['rowDimension']['__multi'] = true; |
| 211 | - $this->mappings['rowDimension']['__object'] = function ($key) { |
|
| 254 | + $this->mappings['rowDimension']['__object'] = function ($key) |
|
| 255 | + { |
|
| 212 | 256 | return $key === 'default' ? $this->object->getDefaultRowDimension() : $this->object->getRowDimension($key); |
| 213 | 257 | }; |
| 214 | - $this->mappings['rowDimension']['collapsed'] = function ($key, $value) { |
|
| 258 | + $this->mappings['rowDimension']['collapsed'] = function ($key, $value) |
|
| 259 | + { |
|
| 215 | 260 | $this->mappings['rowDimension']['__object']($key)->setCollapsed($value); |
| 216 | 261 | }; |
| 217 | - $this->mappings['rowDimension']['outlineLevel'] = function ($key, $value) { |
|
| 262 | + $this->mappings['rowDimension']['outlineLevel'] = function ($key, $value) |
|
| 263 | + { |
|
| 218 | 264 | $this->mappings['rowDimension']['__object']($key)->setOutlineLevel($value); |
| 219 | 265 | }; |
| 220 | - $this->mappings['rowDimension']['rowHeight'] = function ($key, $value) { |
|
| 266 | + $this->mappings['rowDimension']['rowHeight'] = function ($key, $value) |
|
| 267 | + { |
|
| 221 | 268 | $this->mappings['rowDimension']['__object']($key)->setRowHeight($value); |
| 222 | 269 | }; |
| 223 | - $this->mappings['rowDimension']['rowIndex'] = function ($key, $value) { |
|
| 270 | + $this->mappings['rowDimension']['rowIndex'] = function ($key, $value) |
|
| 271 | + { |
|
| 224 | 272 | $this->mappings['rowDimension']['__object']($key)->setRowIndex($value); |
| 225 | 273 | }; |
| 226 | - $this->mappings['rowDimension']['visible'] = function ($key, $value) { |
|
| 274 | + $this->mappings['rowDimension']['visible'] = function ($key, $value) |
|
| 275 | + { |
|
| 227 | 276 | $this->mappings['rowDimension']['__object']($key)->setVisible($value); |
| 228 | 277 | }; |
| 229 | - $this->mappings['rowDimension']['xfIndex'] = function ($key, $value) { |
|
| 278 | + $this->mappings['rowDimension']['xfIndex'] = function ($key, $value) |
|
| 279 | + { |
|
| 230 | 280 | $this->mappings['rowDimension']['__object']($key)->setXfIndex($value); |
| 231 | 281 | }; |
| 232 | - $this->mappings['rowDimension']['zeroHeight'] = function ($key, $value) { |
|
| 282 | + $this->mappings['rowDimension']['zeroHeight'] = function ($key, $value) |
|
| 283 | + { |
|
| 233 | 284 | $this->mappings['rowDimension']['__object']($key)->setZeroHeight($value); |
| 234 | 285 | }; |
| 235 | - $this->mappings['sheetState'] = function ($value) { |
|
| 286 | + $this->mappings['sheetState'] = function ($value) |
|
| 287 | + { |
|
| 236 | 288 | $this->object->setSheetState($value); |
| 237 | 289 | }; |
| 238 | - $this->mappings['showGridlines'] = function ($value) { |
|
| 290 | + $this->mappings['showGridlines'] = function ($value) |
|
| 291 | + { |
|
| 239 | 292 | $this->object->setShowGridlines($value); |
| 240 | 293 | }; |
| 241 | - $this->mappings['tabColor'] = function ($value) { |
|
| 294 | + $this->mappings['tabColor'] = function ($value) |
|
| 295 | + { |
|
| 242 | 296 | $this->object->getTabColor()->setRGB($value); |
| 243 | 297 | }; |
| 244 | - $this->mappings['zoomScale'] = function ($value) { |
|
| 298 | + $this->mappings['zoomScale'] = function ($value) |
|
| 299 | + { |
|
| 245 | 300 | $this->object->getSheetView()->setZoomScale($value); |
| 246 | 301 | }; |
| 247 | 302 | } |
@@ -261,7 +316,7 @@ discard block |
||
| 261 | 316 | $this->documentWrapper->getObject()->createSheet()->setTitle($index); |
| 262 | 317 | } |
| 263 | 318 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndexByName($index); |
| 264 | - } else { |
|
| 319 | + } else { |
|
| 265 | 320 | // create new sheet without a name |
| 266 | 321 | $this->documentWrapper->getObject()->createSheet(); |
| 267 | 322 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndex(0); |