[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * PHPExcel_Calculation_Function 5 * 6 * Copyright (c) 2006 - 2015 PHPExcel 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 * 22 * @category PHPExcel 23 * @package PHPExcel_Calculation 24 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) 25 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 26 * @version ##VERSION##, ##DATE## 27 */ 28 class PHPExcel_Calculation_Function 29 { 30 /* Function categories */ 31 const CATEGORY_CUBE = 'Cube'; 32 const CATEGORY_DATABASE = 'Database'; 33 const CATEGORY_DATE_AND_TIME = 'Date and Time'; 34 const CATEGORY_ENGINEERING = 'Engineering'; 35 const CATEGORY_FINANCIAL = 'Financial'; 36 const CATEGORY_INFORMATION = 'Information'; 37 const CATEGORY_LOGICAL = 'Logical'; 38 const CATEGORY_LOOKUP_AND_REFERENCE = 'Lookup and Reference'; 39 const CATEGORY_MATH_AND_TRIG = 'Math and Trig'; 40 const CATEGORY_STATISTICAL = 'Statistical'; 41 const CATEGORY_TEXT_AND_DATA = 'Text and Data'; 42 43 /** 44 * Category (represented by CATEGORY_*) 45 * 46 * @var string 47 */ 48 private $category; 49 50 /** 51 * Excel name 52 * 53 * @var string 54 */ 55 private $excelName; 56 57 /** 58 * PHPExcel name 59 * 60 * @var string 61 */ 62 private $phpExcelName; 63 64 /** 65 * Create a new PHPExcel_Calculation_Function 66 * 67 * @param string $pCategory Category (represented by CATEGORY_*) 68 * @param string $pExcelName Excel function name 69 * @param string $pPHPExcelName PHPExcel function mapping 70 * @throws PHPExcel_Calculation_Exception 71 */ 72 public function __construct($pCategory = null, $pExcelName = null, $pPHPExcelName = null) 73 { 74 if (($pCategory !== null) && ($pExcelName !== null) && ($pPHPExcelName !== null)) { 75 // Initialise values 76 $this->category = $pCategory; 77 $this->excelName = $pExcelName; 78 $this->phpExcelName = $pPHPExcelName; 79 } else { 80 throw new PHPExcel_Calculation_Exception("Invalid parameters passed."); 81 } 82 } 83 84 /** 85 * Get Category (represented by CATEGORY_*) 86 * 87 * @return string 88 */ 89 public function getCategory() 90 { 91 return $this->category; 92 } 93 94 /** 95 * Set Category (represented by CATEGORY_*) 96 * 97 * @param string $value 98 * @throws PHPExcel_Calculation_Exception 99 */ 100 public function setCategory($value = null) 101 { 102 if (!is_null($value)) { 103 $this->category = $value; 104 } else { 105 throw new PHPExcel_Calculation_Exception("Invalid parameter passed."); 106 } 107 } 108 109 /** 110 * Get Excel name 111 * 112 * @return string 113 */ 114 public function getExcelName() 115 { 116 return $this->excelName; 117 } 118 119 /** 120 * Set Excel name 121 * 122 * @param string $value 123 */ 124 public function setExcelName($value) 125 { 126 $this->excelName = $value; 127 } 128 129 /** 130 * Get PHPExcel name 131 * 132 * @return string 133 */ 134 public function getPHPExcelName() 135 { 136 return $this->phpExcelName; 137 } 138 139 /** 140 * Set PHPExcel name 141 * 142 * @param string $value 143 */ 144 public function setPHPExcelName($value) 145 { 146 $this->phpExcelName = $value; 147 } 148 }
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 |