Prospectus.php 873 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace DNB;
  3. class Prospectus extends AbstractPostSerializable implements PostSerializableInterface {
  4. private Assigment $assigment;
  5. private Questionaire $questionaire;
  6. private Customer $customer;
  7. public function __construct(
  8. Assigment $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. protected static function getClassVars(): array {
  26. return array_keys(get_class_vars(__CLASS__));
  27. }
  28. }