[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * PHPExcel_CalcEngine_CyclicReferenceStack 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_CalcEngine_CyclicReferenceStack 29 { 30 /** 31 * The call stack for calculated cells 32 * 33 * @var mixed[] 34 */ 35 private $stack = array(); 36 37 /** 38 * Return the number of entries on the stack 39 * 40 * @return integer 41 */ 42 public function count() 43 { 44 return count($this->stack); 45 } 46 47 /** 48 * Push a new entry onto the stack 49 * 50 * @param mixed $value 51 */ 52 public function push($value) 53 { 54 $this->stack[$value] = $value; 55 } 56 57 /** 58 * Pop the last entry from the stack 59 * 60 * @return mixed 61 */ 62 public function pop() 63 { 64 return array_pop($this->stack); 65 } 66 67 /** 68 * Test to see if a specified entry exists on the stack 69 * 70 * @param mixed $value The value to test 71 */ 72 public function onStack($value) 73 { 74 return isset($this->stack[$value]); 75 } 76 77 /** 78 * Clear the stack 79 */ 80 public function clear() 81 { 82 $this->stack = array(); 83 } 84 85 /** 86 * Return an array of all entries on the stack 87 * 88 * @return mixed[] 89 */ 90 public function showStack() 91 { 92 return $this->stack; 93 } 94 }
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 |