1 | <?php |
||
8 | class OpenGraphElement implements \JsonSerializable |
||
9 | { |
||
10 | |||
11 | use ValidatorTrait; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $url; |
||
17 | |||
18 | /** |
||
19 | * @var \Kerox\Messenger\Model\Common\Buttons\AbstractButtons[] |
||
20 | */ |
||
21 | protected $buttons = []; |
||
22 | |||
23 | /** |
||
24 | * OpenGraphElement constructor. |
||
25 | * |
||
26 | * @param string $url |
||
27 | */ |
||
28 | 2 | public function __construct(string $url) |
|
34 | |||
35 | /** |
||
36 | * @param \Kerox\Messenger\Model\Common\Buttons\AbstractButtons[] $buttons |
||
37 | * @return \Kerox\Messenger\Model\Message\Attachment\Template\Element\OpenGraphElement |
||
38 | */ |
||
39 | 2 | public function setButtons(array $buttons): OpenGraphElement |
|
48 | |||
49 | /** |
||
50 | * @return array |
||
51 | */ |
||
52 | 2 | protected function getAllowedButtonsType(): array |
|
58 | |||
59 | /** |
||
60 | * @return array |
||
61 | */ |
||
62 | 1 | public function jsonSerialize(): array |
|
71 | } |
||
72 |