\PhpOffice\PhpSpreadsheet\Calculation\TokenStack

Summary

Methods
Properties
Constants
count()
push()
getStackItem()
pop()
last()
clear()
__toString()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$stack
$count
N/A

Properties

$stack

$stack : array

The parser stack for formulae.

Type

array

$count

$count : int

Count of entries in the parser stack.

Type

int

Methods

count()

count() : int

Return the number of entries on the stack.

Returns

int —

push()

push(mixed  $type, mixed  $value, mixed  $reference = null, null|string  $storeKey = null, null|string  $onlyIf = null, null|string  $onlyIfNot = null) : void

Push a new entry onto the stack.

Parameters

mixed $type
mixed $value
mixed $reference
null|string $storeKey

will store the result under this alias

null|string $onlyIf

will only run computation if the matching store key is true

null|string $onlyIfNot

will only run computation if the matching store key is false

getStackItem()

getStackItem(mixed  $type, mixed  $value, mixed  $reference = null, mixed  $storeKey = null, mixed  $onlyIf = null, mixed  $onlyIfNot = null) : mixed

Parameters

mixed $type
mixed $value
mixed $reference
mixed $storeKey
mixed $onlyIf
mixed $onlyIfNot

Returns

mixed —

pop()

pop() : mixed

Pop the last entry from the stack.

Returns

mixed —

last()

last(int  $n = 1) : mixed

Return an entry from the stack without removing it.

Parameters

int $n

number indicating how far back in the stack we want to look

Returns

mixed —

clear()

clear() : void

Clear the stack.

__toString()

__toString() : mixed

Returns

mixed —