PluginProbe
wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin / 6.5.1.7
wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin v6.5.1.7
6.5.1.7 6.5.1.6 6.5.1.5 6.5.1.4 6.5.1.3 6.5.1.2 6.5.1.1 6.5.0.9 6.5.0.8 6.5.0.7 6.5.0.6 trunk 3.4.2.40 3.4.2.41 3.4.2.42 3.4.2.43 3.4.2.44 3.4.2.45 3.4.2.46 3.4.2.47 3.4.2.48 3.4.2.49 3.4.2.50 6.3.2 6.3.3.1 All 47 releases
wpdatatables / lib / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Calculation / Engine / CyclicReferenceStack.php

CyclicReferenceStack.php in wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin 6.5.1.7, at lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php

74 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PhpOffice\PhpSpreadsheet\Calculation\Engine;
4
5 class CyclicReferenceStack
6 {
7 /**
8 * The call stack for calculated cells.
9 *
10 * @var mixed[]
11 */
12 private $stack = [];
13
14 /**
15 * Return the number of entries on the stack.
16 *
17 * @return int
18 */
19 public function count()
20 {
21 return count($this->stack);
22 }
23
24 /**
25 * Push a new entry onto the stack.
26 *
27 * @param mixed $value
28 */
29 public function push($value): void
30 {
31 $this->stack[$value] = $value;
32 }
33
34 /**
35 * Pop the last entry from the stack.
36 *
37 * @return mixed
38 */
39 public function pop()
40 {
41 return array_pop($this->stack);
42 }
43
44 /**
45 * Test to see if a specified entry exists on the stack.
46 *
47 * @param mixed $value The value to test
48 *
49 * @return bool
50 */
51 public function onStack($value)
52 {
53 return isset($this->stack[$value]);
54 }
55
56 /**
57 * Clear the stack.
58 */
59 public function clear(): void
60 {
61 $this->stack = [];
62 }
63
64 /**
65 * Return an array of all entries on the stack.
66 *
67 * @return mixed[]
68 */
69 public function showStack()
70 {
71 return $this->stack;
72 }
73 }
74