function run() { $string = ''; while ($this->pointer < strlen($this->string)) { $result = $this->stateObject->transition(); if ($result) { $this->stateObject->evaluate($string); $this->stateObject = $result; $this->stateObject->t = $this; $this->pointer += $this->stateObject->shiftPointerBy; $this->state = $this->state = \Phlex\Tool\StringTool::getPart('\\', get_class($this->stateObject), -1); $string = ''; } else { $string .= $this->string[$this->pointer]; $this->pointer++; } } return $this->items; }
function getAsBoolean($key) { return $this->has($key) ? StringTool::parseBool($this->getKey($key)) : null; }