fromArray($json); } public function jsonSerialize(): mixed { return $this->getArrayCopy(); } public function fromArray(array $datasets, ? string /*stringable*/ $entityClass = null) : self { foreach($datasets as $dataset) { \ArrayObject::append($dataset); } return $this; } }