| 1 | <?php |
||
| 5 | abstract class AbstractElement implements \JsonSerializable |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | private $title; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var null|string |
||
| 14 | */ |
||
| 15 | private $subtitle; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var null|string |
||
| 19 | */ |
||
| 20 | private $imageUrl; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $title |
||
| 24 | * @param null|string $subtitle |
||
| 25 | * @param null|string $imageUrl |
||
| 26 | */ |
||
| 27 | 25 | public function __construct($title, $subtitle = null, $imageUrl = null) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @return null|string |
||
| 44 | */ |
||
| 45 | 6 | public function getImageUrl() |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @return null|string |
||
| 52 | */ |
||
| 53 | 4 | public function getSubtitle() |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | 6 | public function getTitle() |
|
| 65 | |||
| 66 | /** |
||
| 67 | * @deprecated use the constructor argument instead |
||
| 68 | * @param null|string $imageUrl |
||
| 69 | */ |
||
| 70 | public function setImageUrl($imageUrl) |
||
| 74 | |||
| 75 | |||
| 76 | /** |
||
| 77 | * @deprecated use the constructor argument instead |
||
| 78 | * @param null|string $subtitle |
||
| 79 | */ |
||
| 80 | public function setSubtitle($subtitle) |
||
| 88 | } |
||
| 89 |