Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

朱继来 / 后台订单管理

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Find file
Normal viewHistoryPermalink
Switch branch/tag
  • Order
  • ..
  • Excel2007
  • Theme.php
Theme.php 2.96 KB
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
1 2 3 4
<?php
/**
 * PHPExcel
 *
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
5
 * Copyright (c) 2006 - 2015 PHPExcel
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @category   PHPExcel
 * @package    PHPExcel_Reader_Excel2007
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
23 24
 * @copyright  Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
25 26 27 28 29 30 31 32 33
 * @version    ##VERSION##, ##DATE##
 */


/**
 * PHPExcel_Reader_Excel2007_Theme
 *
 * @category   PHPExcel
 * @package    PHPExcel_Reader_Excel2007
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
34
 * @copyright  Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
35 36 37
 */
class PHPExcel_Reader_Excel2007_Theme
{
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
38 39 40 41 42 43
    /**
     * Theme Name
     *
     * @var string
     */
    private $themeName;
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
44

朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
45 46 47 48 49 50
    /**
     * Colour Scheme Name
     *
     * @var string
     */
    private $colourSchemeName;
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
51

朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
52 53 54 55 56 57
    /**
     * Colour Map indexed by position
     *
     * @var array of string
     */
    private $colourMapValues;
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
58 59


朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
60 61 62 63 64 65
    /**
     * Colour Map
     *
     * @var array of string
     */
    private $colourMap;
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
66 67 68 69


    /**
     * Create a new PHPExcel_Theme
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
70
     *
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
71
     */
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
72
    public function __construct($themeName, $colourSchemeName, $colourMap)
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
73
    {
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
74 75 76 77
        // Initialise values
        $this->themeName        = $themeName;
        $this->colourSchemeName = $colourSchemeName;
        $this->colourMap        = $colourMap;
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
78 79
    }

朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
80 81 82 83 84 85 86 87 88
    /**
     * Get Theme Name
     *
     * @return string
     */
    public function getThemeName()
    {
        return $this->themeName;
    }
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
89 90 91 92 93 94

    /**
     * Get colour Scheme Name
     *
     * @return string
     */
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
95 96 97
    public function getColourSchemeName()
    {
        return $this->colourSchemeName;
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
98 99 100 101 102 103 104
    }

    /**
     * Get colour Map Value by Position
     *
     * @return string
     */
朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
105 106 107 108 109 110
    public function getColourByIndex($index = 0)
    {
        if (isset($this->colourMap[$index])) {
            return $this->colourMap[$index];
        }
        return null;
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
111 112
    }

朱继来's avatar
1. 调整明细编辑;
0b4e495b
 
朱继来 committed 5 years ago
113 114 115 116 117 118 119 120 121 122 123 124 125 126
    /**
     * Implement PHP __clone to create a deep clone, not just a shallow copy.
     */
    public function __clone()
    {
        $vars = get_object_vars($this);
        foreach ($vars as $key => $value) {
            if ((is_object($value)) && ($key != '_parent')) {
                $this->$key = clone $value;
            } else {
                $this->$key = $value;
            }
        }
    }
叶明星's avatar
账期管理
d99f4f05
 
叶明星 committed 6 years ago
127
}