fileName = $fileName; $this->attributeList = $attributeList; $this->fieldList = $fieldList; } public function withEntityType(string $entityType): self { $obj = clone $this; $obj->entityType = $entityType; return $obj; } public function withName(?string $name): self { $obj = clone $this; $obj->name = $name; return $obj; } public function getFileName(): string { return $this->fileName; } /** * @return string[] */ public function getAttributeList(): array { return $this->attributeList; } /** * @return ?string[] */ public function getFieldList(): ?array { return $this->fieldList; } public function getName(): ?string { return $this->name; } public function getEntityType(): string { if ($this->entityType === null) { throw new RuntimeException("No entity-type."); } return $this->entityType; } }