5
* Copyright (c) 2006 - 2013 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
22
* @package PHPExcel_Calculation
23
* @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
24
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25
* @version 1.7.9, 2013-06-02
30
* PHPExcel_CalcEngine_CyclicReferenceStack
32
* @category PHPExcel_CalcEngine_CyclicReferenceStack
33
* @package PHPExcel_Calculation
34
* @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
36
class PHPExcel_CalcEngine_CyclicReferenceStack {
39
* The call stack for calculated cells
43
private $_stack = array();
47
* Return the number of entries on the stack
51
public function count() {
52
return count($this->_stack);
56
* Push a new entry onto the stack
60
public function push($value) {
61
$this->_stack[] = $value;
65
* Pop the last entry from the stack
69
public function pop() {
70
return array_pop($this->_stack);
74
* Test to see if a specified entry exists on the stack
76
* @param mixed $value The value to test
78
public function onStack($value) {
79
return in_array($value, $this->_stack);
85
public function clear() {
86
$this->_stack = array();
90
* Return an array of all entries on the stack
94
public function showStack() {
98
} // class PHPExcel_CalcEngine_CyclicReferenceStack