/** * Get the instance as an array. * * @return array */ public function toArray() { return ['properties' => $this->getProperties(), 'attributes' => $this->getAttributes(), 'sub-items' => $this->subItems->toArray()]; }