PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
tablepress / libraries / vendor / PhpSpreadsheet / Worksheet / PageBreak.php

PageBreak.php in TablePress – Tables in WordPress made easy 3.4, at libraries/vendor/PhpSpreadsheet/Worksheet/PageBreak.php

58 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace TablePress\PhpOffice\PhpSpreadsheet\Worksheet;
4
5 use TablePress\PhpOffice\PhpSpreadsheet\Calculation\Functions;
6 use TablePress\PhpOffice\PhpSpreadsheet\Cell\CellAddress;
7 use TablePress\PhpOffice\PhpSpreadsheet\Cell\Coordinate;
8
9 class PageBreak
10 {
11 private int $breakType;
12
13 private string $coordinate;
14
15 private int $maxColOrRow;
16
17 /**
18 * @param array{0: int, 1: int}|CellAddress|string $coordinate
19 */
20 public function __construct(int $breakType, $coordinate, int $maxColOrRow = -1)
21 {
22 $coordinate = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
23 $this->breakType = $breakType;
24 $this->coordinate = $coordinate;
25 $this->maxColOrRow = $maxColOrRow;
26 }
27
28 public function getBreakType(): int
29 {
30 return $this->breakType;
31 }
32
33 public function getCoordinate(): string
34 {
35 return $this->coordinate;
36 }
37
38 public function getMaxColOrRow(): int
39 {
40 return $this->maxColOrRow;
41 }
42
43 public function getColumnInt(): int
44 {
45 return Coordinate::indexesFromString($this->coordinate)[0];
46 }
47
48 public function getRow(): int
49 {
50 return Coordinate::indexesFromString($this->coordinate)[1];
51 }
52
53 public function getColumnString(): string
54 {
55 return Coordinate::indexesFromString($this->coordinate)[2];
56 }
57 }
58