您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

29 行
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. }