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 / Chart / AxisText.php

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

64 lines 1.1 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\Chart;
4
5 use TablePress\PhpOffice\PhpSpreadsheet\Style\Font;
6
7 class AxisText extends Properties
8 {
9 private ?int $rotation = null;
10
11 private Font $font;
12
13 public function __construct()
14 {
15 parent::__construct();
16 $this->font = new Font();
17 $this->font->setSize(null, true);
18 }
19
20 public function setRotation(?int $rotation): self
21 {
22 $this->rotation = $rotation;
23
24 return $this;
25 }
26
27 public function getRotation(): ?int
28 {
29 return $this->rotation;
30 }
31
32 public function getFillColorObject(): ChartColor
33 {
34 $fillColor = $this->font->getChartColor();
35 if ($fillColor === null) {
36 $fillColor = new ChartColor();
37 $this->font->setChartColorFromObject($fillColor);
38 }
39
40 return $fillColor;
41 }
42
43 public function getFont(): Font
44 {
45 return $this->font;
46 }
47
48 public function setFont(Font $font): self
49 {
50 $this->font = $font;
51
52 return $this;
53 }
54
55 /**
56 * Implement PHP __clone to create a deep clone, not just a shallow copy.
57 */
58 public function __clone()
59 {
60 parent::__clone();
61 $this->font = clone $this->font;
62 }
63 }
64