PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
tablepress / libraries / vendor / PhpSpreadsheet / Calculation / CalculationParserOnly.php

CalculationParserOnly.php in TablePress – Tables in WordPress made easy 3.4, at libraries/vendor/PhpSpreadsheet/Calculation/CalculationParserOnly.php

44 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace TablePress\PhpOffice\PhpSpreadsheet\Calculation;
4
5 /**
6 * A dedicated Calculation singleton for formula parsing only.
7 *
8 * This class provides an isolated instance specifically for parsing formulas
9 * without branch pruning, avoiding state conflicts with the main Calculation
10 * singleton used for cell value calculations.
11 *
12 * @internal
13 */
14 final class CalculationParserOnly extends Calculation
15 {
16 /**
17 * Instance of this class.
18 */
19 private static ?CalculationParserOnly $parserInstance = null;
20
21 /**
22 * Branch pruning is disabled by default for parsing-only operations.
23 */
24 protected bool $branchPruningEnabled = false;
25
26 /**
27 * Get the singleton instance of this parser-only calculator.
28 */
29 public static function getParserInstance(): self
30 {
31 if (!self::$parserInstance) {
32 self::$parserInstance = new self();
33 }
34
35 return self::$parserInstance;
36 }
37
38 /** @param mixed $enabled Unused, property will always be false in this class */
39 public function setBranchPruningEnabled($enabled): self
40 {
41 return $this;
42 }
43 }
44