public function getStateStack() { return array_slice($this->stateStack, 0, $this->currentStackPosition + 1); }