| 1 | <?php |
||
| 17 | class NewsItem extends Message |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Messages type. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $type = 'news'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Properties. |
||
| 28 | * |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | protected $properties = [ |
||
| 32 | 'title', |
||
| 33 | 'description', |
||
| 34 | 'url', |
||
| 35 | 'image', |
||
| 36 | ]; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Aliases of attribute. |
||
| 40 | * |
||
| 41 | * @var array |
||
| 42 | */ |
||
| 43 | protected $jsonAliases = [ |
||
| 44 | 'pic_url' => 'image', |
||
| 45 | ]; |
||
| 46 | |||
| 47 | public function toXmlArray() |
||
| 56 | } |
||
| 57 |