PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.0.10
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.0.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Function.php +77 -76 3.1.23.0.10 View file →
@@ -1,10 +1,9 @@
1 1 <?php
2 -
3 2 /**
4 - * PHPExcel_Calculation_Function
3 + * PHPExcel
5 4 *
6 - * Copyright (c) 2006 - 2015 PHPExcel
5 + * Copyright (c) 2006 - 2014 PHPExcel
7 6 *
8 7 * This library is free software; you can redistribute it and/or
9 8 * modify it under the terms of the GNU Lesser General Public
10 9 * License as published by the Free Software Foundation; either
@@ -20,66 +19,74 @@
20 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 20 *
22 21 * @category PHPExcel
23 22 * @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
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
26 25 * @version ##VERSION##, ##DATE##
27 26 */
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 27
43 - /**
44 - * Category (represented by CATEGORY_*)
45 - *
46 - * @var string
47 - */
48 - private $category;
49 28
50 - /**
51 - * Excel name
52 - *
53 - * @var string
54 - */
55 - private $excelName;
29 +/**
30 + * PHPExcel_Calculation_Function
31 + *
32 + * @category PHPExcel
33 + * @package PHPExcel_Calculation
34 + * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
35 + */
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';
56 49
57 - /**
58 - * PHPExcel name
59 - *
60 - * @var string
61 - */
62 - private $phpExcelName;
50 + /**
51 + * Category (represented by CATEGORY_*)
52 + *
53 + * @var string
54 + */
55 + private $_category;
63 56
57 + /**
58 + * Excel name
59 + *
60 + * @var string
61 + */
62 + private $_excelName;
63 +
64 + /**
65 + * PHPExcel name
66 + *
67 + * @var string
68 + */
69 + private $_phpExcelName;
70 +
64 71 /**
65 72 * Create a new PHPExcel_Calculation_Function
66 73 *
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
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
71 78 */
72 - public function __construct($pCategory = null, $pExcelName = null, $pPHPExcelName = null)
79 + public function __construct($pCategory = NULL, $pExcelName = NULL, $pPHPExcelName = NULL)
73 80 {
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 - }
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.");
88 + }
82 89 }
83 90
84 91 /**
85 92 * Get Category (represented by CATEGORY_*)
@@ -85,26 +92,24 @@
85 92 * Get Category (represented by CATEGORY_*)
86 93 *
87 94 * @return string
88 95 */
89 - public function getCategory()
90 - {
91 - return $this->category;
96 + public function getCategory() {
97 + return $this->_category;
92 98 }
93 99
94 100 /**
95 101 * Set Category (represented by CATEGORY_*)
96 102 *
97 - * @param string $value
98 - * @throws PHPExcel_Calculation_Exception
103 + * @param string $value
104 + * @throws PHPExcel_Calculation_Exception
99 105 */
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 - }
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.");
111 + }
107 112 }
108 113
109 114 /**
110 115 * Get Excel name
@@ -110,21 +115,19 @@
110 115 * Get Excel name
111 116 *
112 117 * @return string
113 118 */
114 - public function getExcelName()
115 - {
116 - return $this->excelName;
119 + public function getExcelName() {
120 + return $this->_excelName;
117 121 }
118 122
119 123 /**
120 124 * Set Excel name
121 125 *
122 - * @param string $value
126 + * @param string $value
123 127 */
124 - public function setExcelName($value)
125 - {
126 - $this->excelName = $value;
128 + public function setExcelName($value) {
129 + $this->_excelName = $value;
127 130 }
128 131
129 132 /**
130 133 * Get PHPExcel name
@@ -130,19 +133,17 @@
130 133 * Get PHPExcel name
131 134 *
132 135 * @return string
133 136 */
134 - public function getPHPExcelName()
135 - {
136 - return $this->phpExcelName;
137 + public function getPHPExcelName() {
138 + return $this->_phpExcelName;
137 139 }
138 140
139 141 /**
140 142 * Set PHPExcel name
141 143 *
142 - * @param string $value
144 + * @param string $value
143 145 */
144 - public function setPHPExcelName($value)
145 - {
146 - $this->phpExcelName = $value;
146 + public function setPHPExcelName($value) {
147 + $this->_phpExcelName = $value;
147 148 }
148 149 }