public function pushState($state) { $this->stateStack[++$this->currentStackPosition] = $state; $this->currentStateData = $this->stateData[$state]; }