| 1 | <?php namespace FreedomCore\TrinityCore\Console\Classes; |
||
| 7 | class Item |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Item ID |
||
| 12 | * @var int|null |
||
| 13 | */ |
||
| 14 | protected $id = null; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Item Count |
||
| 18 | * @var int|null |
||
| 19 | */ |
||
| 20 | protected $count = null; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Item constructor. |
||
| 24 | * @param int $itemID |
||
| 25 | * @param int $itemCount |
||
| 26 | */ |
||
| 27 | public function __construct(int $itemID, int $itemCount = 1) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get Item ID |
||
| 35 | * @return int |
||
| 36 | */ |
||
| 37 | public function getID() : int |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get Item Quantity |
||
| 44 | * @return int |
||
| 45 | */ |
||
| 46 | public function getQuantity() : int |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Convert Class Object To Array |
||
| 53 | * @return array |
||
| 54 | */ |
||
| 55 | public function toArray() : array |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Convert Class Object To TrinityCore Command Attribute |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | public function toCommandAttribute() : string |
||
| 71 | } |
||
| 72 |