1 | <?php namespace FreedomCore\TrinityCore\Support\Classes; |
||
7 | class Items |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * Array of items |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $items = []; |
||
15 | |||
16 | /** |
||
17 | * Items constructor. |
||
18 | * @param array ...$items |
||
19 | */ |
||
20 | 8 | public function __construct(...$items) |
|
27 | |||
28 | /** |
||
29 | * Get Items |
||
30 | * @return array |
||
31 | */ |
||
32 | 2 | public function getItems() : array |
|
36 | |||
37 | /** |
||
38 | * Count how many items we are created |
||
39 | * @return int |
||
40 | */ |
||
41 | 2 | public function count() : int |
|
45 | |||
46 | /** |
||
47 | * Convert Class Object To Array |
||
48 | * @return array |
||
49 | */ |
||
50 | 2 | public function toArray() : array |
|
61 | |||
62 | /** |
||
63 | * Convert Class Object To TrinityCore Command Attribute |
||
64 | * @return string |
||
65 | */ |
||
66 | 2 | public function toCommandAttribute() : string |
|
74 | } |
||
75 |