1 | <?php |
||
5 | class ServerEntity |
||
6 | { |
||
7 | /** @var Cpu */ |
||
8 | public $cpu; |
||
9 | /** @var Ram */ |
||
10 | public $ram; |
||
11 | /** @var Hdd */ |
||
12 | public $hdd; |
||
13 | |||
14 | /** |
||
15 | * VMachine constructor. |
||
16 | * |
||
17 | * @param int $cpu |
||
18 | * @param int $ram |
||
19 | * @param int $hdd |
||
20 | */ |
||
21 | public function __construct(int $cpu, int $ram, int $hdd) |
||
27 | |||
28 | /** |
||
29 | * @return Cpu |
||
30 | */ |
||
31 | public function getCpu(): Cpu |
||
35 | |||
36 | /** |
||
37 | * @return Ram |
||
38 | */ |
||
39 | public function getRam(): Ram |
||
43 | |||
44 | /** |
||
45 | * @return Hdd |
||
46 | */ |
||
47 | public function getHdd(): Hdd |
||
51 | |||
52 | /** |
||
53 | * VMachine create. |
||
54 | * |
||
55 | * @param int $cpu |
||
56 | * @param int $ram |
||
57 | * @param int $hdd |
||
58 | * |
||
59 | * @return static |
||
60 | */ |
||
61 | public static function create(int $cpu, int $ram, int $hdd) |
||
65 | |||
66 | /** |
||
67 | * VMachine create. |
||
68 | * |
||
69 | * @param ServerEntity $vmachine |
||
70 | * |
||
71 | * @return static |
||
72 | * |
||
73 | * @internal param int $cpu |
||
74 | * @internal param int $ram |
||
75 | * @internal param int $hdd |
||
76 | */ |
||
77 | public static function createAsVm($vmachine) |
||
85 | } |
||
86 |