| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class PageBlockCaption extends TdObject |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'pageBlockCaption'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Content of the caption. |
||
| 20 | */ |
||
| 21 | protected RichText $text; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Block credit (like HTML tag <cite>). |
||
| 25 | */ |
||
| 26 | protected RichText $credit; |
||
| 27 | |||
| 28 | public function __construct(RichText $text, RichText $credit) |
||
| 29 | { |
||
| 30 | $this->text = $text; |
||
| 31 | $this->credit = $credit; |
||
| 32 | } |
||
| 33 | |||
| 34 | public static function fromArray(array $array): PageBlockCaption |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 42 | public function typeSerialize(): array |
||
| 43 | { |
||
| 44 | return [ |
||
| 45 | '@type' => static::TYPE_NAME, |
||
| 46 | 'text' => $this->text->typeSerialize(), |
||
| 47 | 'credit' => $this->credit->typeSerialize(), |
||
| 48 | ]; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function getText(): RichText |
||
| 54 | } |
||
| 55 | |||
| 56 | public function getCredit(): RichText |
||
| 59 | } |
||
| 60 | } |
||
| 61 |