ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
FormulaToken.php
Go to the documentation of this file.
1
<?php
29
/*
30
PARTLY BASED ON:
31
Copyright (c) 2007 E. W. Bachtal, Inc.
32
33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
34
and associated documentation files (the "Software"), to deal in the Software without restriction,
35
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
36
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
37
subject to the following conditions:
38
39
The above copyright notice and this permission notice shall be included in all copies or substantial
40
portions of the Software.
41
42
The software is provided "as is", without warranty of any kind, express or implied, including but not
43
limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In
44
no event shall the authors or copyright holders be liable for any claim, damages or other liability,
45
whether in an action of contract, tort or otherwise, arising from, out of or in connection with the
46
software or the use or other dealings in the software.
47
48
http://ewbi.blogs.com/develops/2007/03/excel_formula_p.html
49
http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
50
*/
51
52
60
class
PHPExcel_Calculation_FormulaToken
{
61
/* Token types */
62
const
TOKEN_TYPE_NOOP
=
'Noop'
;
63
const
TOKEN_TYPE_OPERAND
=
'Operand'
;
64
const
TOKEN_TYPE_FUNCTION
=
'Function'
;
65
const
TOKEN_TYPE_SUBEXPRESSION
=
'Subexpression'
;
66
const
TOKEN_TYPE_ARGUMENT
=
'Argument'
;
67
const
TOKEN_TYPE_OPERATORPREFIX
=
'OperatorPrefix'
;
68
const
TOKEN_TYPE_OPERATORINFIX
=
'OperatorInfix'
;
69
const
TOKEN_TYPE_OPERATORPOSTFIX
=
'OperatorPostfix'
;
70
const
TOKEN_TYPE_WHITESPACE
=
'Whitespace'
;
71
const
TOKEN_TYPE_UNKNOWN
=
'Unknown'
;
72
73
/* Token subtypes */
74
const
TOKEN_SUBTYPE_NOTHING
=
'Nothing'
;
75
const
TOKEN_SUBTYPE_START
=
'Start'
;
76
const
TOKEN_SUBTYPE_STOP
=
'Stop'
;
77
const
TOKEN_SUBTYPE_TEXT
=
'Text'
;
78
const
TOKEN_SUBTYPE_NUMBER
=
'Number'
;
79
const
TOKEN_SUBTYPE_LOGICAL
=
'Logical'
;
80
const
TOKEN_SUBTYPE_ERROR
=
'Error'
;
81
const
TOKEN_SUBTYPE_RANGE
=
'Range'
;
82
const
TOKEN_SUBTYPE_MATH
=
'Math'
;
83
const
TOKEN_SUBTYPE_CONCATENATION
=
'Concatenation'
;
84
const
TOKEN_SUBTYPE_INTERSECTION
=
'Intersection'
;
85
const
TOKEN_SUBTYPE_UNION
=
'Union'
;
86
92
private
$_value
;
93
99
private
$_tokenType
;
100
106
private
$_tokenSubType
;
107
115
public
function
__construct
($pValue, $pTokenType =
PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN
, $pTokenSubType =
PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING
)
116
{
117
// Initialise values
118
$this->_value = $pValue;
119
$this->_tokenType = $pTokenType;
120
$this->_tokenSubType = $pTokenSubType;
121
}
122
128
public
function
getValue
() {
129
return
$this->_value
;
130
}
131
137
public
function
setValue
($value) {
138
$this->_value = $value;
139
}
140
146
public
function
getTokenType
() {
147
return
$this->_tokenType
;
148
}
149
155
public
function
setTokenType
($value =
PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN
) {
156
$this->_tokenType = $value;
157
}
158
164
public
function
getTokenSubType
() {
165
return
$this->_tokenSubType
;
166
}
167
173
public
function
setTokenSubType
($value =
PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING
) {
174
$this->_tokenSubType = $value;
175
}
176
}
PHPExcel_Calculation_FormulaToken\getTokenType
getTokenType()
Get Token Type (represented by TOKEN_TYPE_*)
Definition:
FormulaToken.php:146
PHPExcel_Calculation_FormulaToken
Definition:
FormulaToken.php:60
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_OPERAND
const TOKEN_TYPE_OPERAND
Definition:
FormulaToken.php:63
PHPExcel_Calculation_FormulaToken\setValue
setValue($value)
Set Value.
Definition:
FormulaToken.php:137
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_RANGE
const TOKEN_SUBTYPE_RANGE
Definition:
FormulaToken.php:81
PHPExcel_Calculation_FormulaToken\__construct
__construct($pValue, $pTokenType=PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN, $pTokenSubType=PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING)
Create a new PHPExcel_Calculation_FormulaToken.
Definition:
FormulaToken.php:115
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_OPERATORPREFIX
const TOKEN_TYPE_OPERATORPREFIX
Definition:
FormulaToken.php:67
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_FUNCTION
const TOKEN_TYPE_FUNCTION
Definition:
FormulaToken.php:64
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_START
const TOKEN_SUBTYPE_START
Definition:
FormulaToken.php:75
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_LOGICAL
const TOKEN_SUBTYPE_LOGICAL
Definition:
FormulaToken.php:79
PHPExcel_Calculation_FormulaToken\getValue
getValue()
Get Value.
Definition:
FormulaToken.php:128
PHPExcel_Calculation_FormulaToken\setTokenSubType
setTokenSubType($value=PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING)
Set Token SubType.
Definition:
FormulaToken.php:173
PHPExcel_Calculation_FormulaToken\setTokenType
setTokenType($value=PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN)
Set Token Type.
Definition:
FormulaToken.php:155
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_NOTHING
const TOKEN_SUBTYPE_NOTHING
Definition:
FormulaToken.php:74
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_STOP
const TOKEN_SUBTYPE_STOP
Definition:
FormulaToken.php:76
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_UNION
const TOKEN_SUBTYPE_UNION
Definition:
FormulaToken.php:85
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_TEXT
const TOKEN_SUBTYPE_TEXT
Definition:
FormulaToken.php:77
PHPExcel_Calculation_FormulaToken\$_value
$_value
Definition:
FormulaToken.php:92
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_INTERSECTION
const TOKEN_SUBTYPE_INTERSECTION
Definition:
FormulaToken.php:84
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_OPERATORPOSTFIX
const TOKEN_TYPE_OPERATORPOSTFIX
Definition:
FormulaToken.php:69
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_MATH
const TOKEN_SUBTYPE_MATH
Definition:
FormulaToken.php:82
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_NUMBER
const TOKEN_SUBTYPE_NUMBER
Definition:
FormulaToken.php:78
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_ERROR
const TOKEN_SUBTYPE_ERROR
Definition:
FormulaToken.php:80
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_WHITESPACE
const TOKEN_TYPE_WHITESPACE
Definition:
FormulaToken.php:70
PHPExcel_Calculation_FormulaToken\TOKEN_SUBTYPE_CONCATENATION
const TOKEN_SUBTYPE_CONCATENATION
Definition:
FormulaToken.php:83
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_ARGUMENT
const TOKEN_TYPE_ARGUMENT
Definition:
FormulaToken.php:66
PHPExcel_Calculation_FormulaToken\$_tokenSubType
$_tokenSubType
Definition:
FormulaToken.php:106
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_NOOP
const TOKEN_TYPE_NOOP
Definition:
FormulaToken.php:62
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_SUBEXPRESSION
const TOKEN_TYPE_SUBEXPRESSION
Definition:
FormulaToken.php:65
PHPExcel_Calculation_FormulaToken\$_tokenType
$_tokenType
Definition:
FormulaToken.php:99
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_UNKNOWN
const TOKEN_TYPE_UNKNOWN
Definition:
FormulaToken.php:71
PHPExcel_Calculation_FormulaToken\getTokenSubType
getTokenSubType()
Get Token SubType (represented by TOKEN_SUBTYPE_*)
Definition:
FormulaToken.php:164
PHPExcel_Calculation_FormulaToken\TOKEN_TYPE_OPERATORINFIX
const TOKEN_TYPE_OPERATORINFIX
Definition:
FormulaToken.php:68
libs
composer
vendor
phpoffice
phpexcel
Classes
PHPExcel
Calculation
FormulaToken.php
Generated on Sat Jan 18 2025 19:01:06 for ILIAS by
1.8.13 (using
Doxyfile
)