Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

29 lines
553B

  1. <?php
  2. namespace App\Transmission\Layouts;
  3. abstract class IFLayout
  4. {
  5. public IFCommonHeader $header;
  6. const COL_NAME_HEADER = 'Header';
  7. const COL_NAME_BODY = 'Body';
  8. public function __construct()
  9. {
  10. $this->header = new IFCommonHeader();
  11. }
  12. abstract public function getBodyArray(): array;
  13. public function toArray(): array
  14. {
  15. $result = [];
  16. $result[self::COL_NAME_HEADER] = $this->header->toArray();
  17. $result[self::COL_NAME_BODY] = $this->getBodyArray();
  18. return $result;
  19. }
  20. }