Updated gui for user facility settings (#1327)
[openemr.git] / vendor / phpoffice / phpexcel / Classes / PHPExcel / Calculation / Function.php
blob1301cd096cf79d08c6433fa8f02804b1e3e1ad7a
1 <?php
2 /**
3 * PHPExcel
5 * Copyright (c) 2006 - 2014 PHPExcel
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.
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.
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
21 * @category PHPExcel
22 * @package PHPExcel_Calculation
23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version ##VERSION##, ##DATE##
29 /**
30 * PHPExcel_Calculation_Function
32 * @category PHPExcel
33 * @package PHPExcel_Calculation
34 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
36 class PHPExcel_Calculation_Function {
37 /* Function categories */
38 const CATEGORY_CUBE = 'Cube';
39 const CATEGORY_DATABASE = 'Database';
40 const CATEGORY_DATE_AND_TIME = 'Date and Time';
41 const CATEGORY_ENGINEERING = 'Engineering';
42 const CATEGORY_FINANCIAL = 'Financial';
43 const CATEGORY_INFORMATION = 'Information';
44 const CATEGORY_LOGICAL = 'Logical';
45 const CATEGORY_LOOKUP_AND_REFERENCE = 'Lookup and Reference';
46 const CATEGORY_MATH_AND_TRIG = 'Math and Trig';
47 const CATEGORY_STATISTICAL = 'Statistical';
48 const CATEGORY_TEXT_AND_DATA = 'Text and Data';
50 /**
51 * Category (represented by CATEGORY_*)
53 * @var string
55 private $_category;
57 /**
58 * Excel name
60 * @var string
62 private $_excelName;
64 /**
65 * PHPExcel name
67 * @var string
69 private $_phpExcelName;
71 /**
72 * Create a new PHPExcel_Calculation_Function
74 * @param string $pCategory Category (represented by CATEGORY_*)
75 * @param string $pExcelName Excel function name
76 * @param string $pPHPExcelName PHPExcel function mapping
77 * @throws PHPExcel_Calculation_Exception
79 public function __construct($pCategory = NULL, $pExcelName = NULL, $pPHPExcelName = NULL)
81 if (($pCategory !== NULL) && ($pExcelName !== NULL) && ($pPHPExcelName !== NULL)) {
82 // Initialise values
83 $this->_category = $pCategory;
84 $this->_excelName = $pExcelName;
85 $this->_phpExcelName = $pPHPExcelName;
86 } else {
87 throw new PHPExcel_Calculation_Exception("Invalid parameters passed.");
91 /**
92 * Get Category (represented by CATEGORY_*)
94 * @return string
96 public function getCategory() {
97 return $this->_category;
101 * Set Category (represented by CATEGORY_*)
103 * @param string $value
104 * @throws PHPExcel_Calculation_Exception
106 public function setCategory($value = null) {
107 if (!is_null($value)) {
108 $this->_category = $value;
109 } else {
110 throw new PHPExcel_Calculation_Exception("Invalid parameter passed.");
115 * Get Excel name
117 * @return string
119 public function getExcelName() {
120 return $this->_excelName;
124 * Set Excel name
126 * @param string $value
128 public function setExcelName($value) {
129 $this->_excelName = $value;
133 * Get PHPExcel name
135 * @return string
137 public function getPHPExcelName() {
138 return $this->_phpExcelName;
142 * Set PHPExcel name
144 * @param string $value
146 public function setPHPExcelName($value) {
147 $this->_phpExcelName = $value;