[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * PHPExcel 4 * 5 * Copyright (c) 2006 - 2015 PHPExcel 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * 21 * @category PHPExcel 22 * @package PHPExcel_Reader_Excel2007 23 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) 24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 25 * @version ##VERSION##, ##DATE## 26 */ 27 28 29 /** 30 * PHPExcel_Reader_Excel2007_Theme 31 * 32 * @category PHPExcel 33 * @package PHPExcel_Reader_Excel2007 34 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) 35 */ 36 class PHPExcel_Reader_Excel2007_Theme 37 { 38 /** 39 * Theme Name 40 * 41 * @var string 42 */ 43 private $themeName; 44 45 /** 46 * Colour Scheme Name 47 * 48 * @var string 49 */ 50 private $colourSchemeName; 51 52 /** 53 * Colour Map indexed by position 54 * 55 * @var array of string 56 */ 57 private $colourMapValues; 58 59 60 /** 61 * Colour Map 62 * 63 * @var array of string 64 */ 65 private $colourMap; 66 67 68 /** 69 * Create a new PHPExcel_Theme 70 * 71 */ 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 80 /** 81 * Get Theme Name 82 * 83 * @return string 84 */ 85 public function getThemeName() 86 { 87 return $this->themeName; 88 } 89 90 /** 91 * Get colour Scheme Name 92 * 93 * @return string 94 */ 95 public function getColourSchemeName() 96 { 97 return $this->colourSchemeName; 98 } 99 100 /** 101 * Get colour Map Value by Position 102 * 103 * @return string 104 */ 105 public function getColourByIndex($index = 0) 106 { 107 if (isset($this->colourMap[$index])) { 108 return $this->colourMap[$index]; 109 } 110 return null; 111 } 112 113 /** 114 * Implement PHP __clone to create a deep clone, not just a shallow copy. 115 */ 116 public function __clone() 117 { 118 $vars = get_object_vars($this); 119 foreach ($vars as $key => $value) { 120 if ((is_object($value)) && ($key != '_parent')) { 121 $this->$key = clone $value; 122 } else { 123 $this->$key = $value; 124 } 125 } 126 } 127 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |