public function jsonSerialize() { return ['nodeType' => $this->getType()] + get_object_vars($this); }