Prospectus.php 761 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace DNB;
  3. class Prospectus extends AbstractPostSerializable implements PostSerializableInterface {
  4. private Assignment $assigment;
  5. private Questionaire $questionaire;
  6. private Customer $customer;
  7. public function __construct(
  8. Assignment $assigment,
  9. Questionaire $questionaire,
  10. Customer $customer
  11. ) {
  12. $this->assigment = $assigment;
  13. $this->questionaire = $questionaire;
  14. $this->customer = $customer;
  15. }
  16. public function toPostParams(): array {
  17. return array_merge(
  18. $this->assigment->toPostParams(),
  19. $this->questionaire->toPostParams(),
  20. [
  21. 'customer' => $this->customer->toPostParams()
  22. ]
  23. );
  24. }
  25. }