| 1 | <?php |
||
| 5 | class Item |
||
| 6 | { |
||
| 7 | const TYPE_NONE = 0; |
||
| 8 | const TYPE_ALERT = 1; |
||
| 9 | const TYPE_INFO = 2; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $text; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | protected $type; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $text |
||
| 23 | * |
||
| 24 | * @return $this |
||
| 25 | */ |
||
| 26 | 3 | public function setText($text) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Returns text attribute. |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | 3 | public function getText() |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @param int $type Type of the item, can be 0, 1 or 2 |
||
| 49 | * |
||
| 50 | * @return $this |
||
| 51 | */ |
||
| 52 | 2 | public function setType($type) |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @return int |
||
| 61 | */ |
||
| 62 | 3 | public function getType() |
|
| 70 | |||
| 71 | /** |
||
| 72 | * Returns an array representation of this object. |
||
| 73 | * |
||
| 74 | * @return array |
||
| 75 | */ |
||
| 76 | 3 | public function toArray() |
|
| 84 | } |
||
| 85 |