ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Theme.php
Go to the documentation of this file.
1<?php
37{
43 private $_themeName;
44
51
58
59
65 private $_colourMap;
66
67
72 public function __construct($themeName,$colourSchemeName,$colourMap)
73 {
74 // Initialise values
75 $this->_themeName = $themeName;
76 $this->_colourSchemeName = $colourSchemeName;
77 $this->_colourMap = $colourMap;
78 }
79
85 public function getThemeName()
86 {
87 return $this->_themeName;
88 }
89
95 public function getColourSchemeName() {
97 }
98
104 public function getColourByIndex($index=0) {
105 if (isset($this->_colourMap[$index])) {
106 return $this->_colourMap[$index];
107 }
108 return null;
109 }
110
114 public function __clone() {
115 $vars = get_object_vars($this);
116 foreach ($vars as $key => $value) {
117 if ((is_object($value)) && ($key != '_parent')) {
118 $this->$key = clone $value;
119 } else {
120 $this->$key = $value;
121 }
122 }
123 }
124}
An exception for terminatinating execution or to throw for unit testing.
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
Definition: Theme.php:114
getColourByIndex($index=0)
Get colour Map Value by Position.
Definition: Theme.php:104
__construct($themeName, $colourSchemeName, $colourMap)
Create a new PHPExcel_Theme.
Definition: Theme.php:72
getColourSchemeName()
Get colour Scheme Name.
Definition: Theme.php:95
getThemeName()
Get Theme Name.
Definition: Theme.php:85