PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.7
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.7
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Reader / Xlsx / Theme.php

Theme.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.4.7, at vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Theme.php

94 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx;
4
5 class Theme
6 {
7 /**
8 * Theme Name.
9 *
10 * @var string
11 */
12 private $themeName;
13
14 /**
15 * Colour Scheme Name.
16 *
17 * @var string
18 */
19 private $colourSchemeName;
20
21 /**
22 * Colour Map.
23 *
24 * @var array of string
25 */
26 private $colourMap;
27
28 /**
29 * Create a new Theme.
30 *
31 * @param mixed $themeName
32 * @param mixed $colourSchemeName
33 * @param mixed $colourMap
34 */
35 public function __construct($themeName, $colourSchemeName, $colourMap)
36 {
37 // Initialise values
38 $this->themeName = $themeName;
39 $this->colourSchemeName = $colourSchemeName;
40 $this->colourMap = $colourMap;
41 }
42
43 /**
44 * Get Theme Name.
45 *
46 * @return string
47 */
48 public function getThemeName()
49 {
50 return $this->themeName;
51 }
52
53 /**
54 * Get colour Scheme Name.
55 *
56 * @return string
57 */
58 public function getColourSchemeName()
59 {
60 return $this->colourSchemeName;
61 }
62
63 /**
64 * Get colour Map Value by Position.
65 *
66 * @param mixed $index
67 *
68 * @return string
69 */
70 public function getColourByIndex($index)
71 {
72 if (isset($this->colourMap[$index])) {
73 return $this->colourMap[$index];
74 }
75
76 return null;
77 }
78
79 /**
80 * Implement PHP __clone to create a deep clone, not just a shallow copy.
81 */
82 public function __clone()
83 {
84 $vars = get_object_vars($this);
85 foreach ($vars as $key => $value) {
86 if ((is_object($value)) && ($key != '_parent')) {
87 $this->$key = clone $value;
88 } else {
89 $this->$key = $value;
90 }
91 }
92 }
93 }
94