PHPExcel_Reader_Excel2007
[ class tree: PHPExcel_Reader_Excel2007 ] [ index: PHPExcel_Reader_Excel2007 ] [ all elements ]

Source for file Theme.php

Documentation is available at Theme.php

  1. <?php
  2. /**
  3.  * PHPExcel
  4.  *
  5.  * Copyright (c) 2006 - 2011 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 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
  24.  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  25.  * @version    1.7.6, 2011-02-27
  26.  */
  27.  
  28.  
  29. /**
  30.  * PHPExcel_Reader_Excel2007_Theme
  31.  *
  32.  * @category   PHPExcel
  33.  * @package    PHPExcel_Reader_Excel2007
  34.  * @copyright  Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
  35.  */
  36. {
  37.     /**
  38.      * Theme Name
  39.      *
  40.      * @var string 
  41.      */
  42.     private $_themeName;
  43.  
  44.     /**
  45.      * Colour Scheme Name
  46.      *
  47.      * @var string 
  48.      */
  49.     private $_colourSchemeName;
  50.  
  51.     /**
  52.      * Colour Map indexed by position
  53.      *
  54.      * @var array of string
  55.      */
  56.     private $_colourMapValues;
  57.  
  58.  
  59.     /**
  60.      * Colour Map
  61.      *
  62.      * @var array of string
  63.      */
  64.     private $_colourMap;
  65.  
  66.  
  67.     /**
  68.      * Create a new PHPExcel_Theme
  69.      *
  70.      */
  71.     public function __construct($themeName,$colourSchemeName,$colourMap)
  72.     {
  73.         // Initialise values
  74.         $this->_themeName            $themeName;
  75.         $this->_colourSchemeName    $colourSchemeName;
  76.         $this->_colourMap            $colourMap;
  77.     }
  78.  
  79.     /**
  80.      * Get Theme Name
  81.      *
  82.      * @return string 
  83.      */
  84.     public function getThemeName()
  85.     {
  86.         return $this->_themeName;
  87.     }
  88.  
  89.     /**
  90.      * Get colour Scheme Name
  91.      *
  92.      * @return string 
  93.      */
  94.     public function getColourSchemeName({
  95.         return $this->_colourSchemeName;
  96.     }
  97.  
  98.     /**
  99.      * Get colour Map Value by Position
  100.      *
  101.      * @return string 
  102.      */
  103.     public function getColourByIndex($index=0{
  104.         if (isset($this->_colourMap[$index])) {
  105.             return $this->_colourMap[$index];
  106.         }
  107.         return null;
  108.     }
  109.  
  110.     /**
  111.      * Implement PHP __clone to create a deep clone, not just a shallow copy.
  112.      */
  113.     public function __clone({
  114.         $vars get_object_vars($this);
  115.         foreach ($vars as $key => $value{
  116.             if ((is_object($value)) && ($key != '_parent')) {
  117.                 $this->$key clone $value;
  118.             else {
  119.                 $this->$key $value;
  120.             }
  121.         }
  122.     }
  123. }

Documentation generated on Sun, 27 Feb 2011 16:35:40 -0800 by phpDocumentor 1.4.3