質問編集履歴
2
脱字の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
}
|
44
44
|
|
45
|
-
|
45
|
+
}
|
46
46
|
|
47
47
|
$menus = new Menu();
|
48
48
|
|
1
code機能利用、getName()記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,29 +8,43 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
+
```php
|
12
|
+
|
11
13
|
<?php
|
12
14
|
|
13
15
|
class Menu {
|
14
16
|
|
17
|
+
private $name;
|
18
|
+
|
15
|
-
|
19
|
+
private $orderCount = 0;
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
public function getName() {
|
24
|
+
|
25
|
+
return $this->name;
|
26
|
+
|
27
|
+
}
|
16
28
|
|
17
29
|
|
18
30
|
|
19
31
|
public function getOrderCount() {
|
20
32
|
|
21
|
-
return $this->orderCount;
|
33
|
+
return $this->orderCount;
|
34
|
+
|
35
|
+
}
|
22
36
|
|
23
37
|
|
24
38
|
|
25
|
-
public function
|
39
|
+
public function setOrderCount($orderCount) {
|
26
40
|
|
27
|
-
$this->orderCount = $orderCount;
|
41
|
+
$this->orderCount = $orderCount;
|
28
42
|
|
29
|
-
}
|
43
|
+
}
|
30
44
|
|
31
45
|
|
32
46
|
|
33
|
-
$menus = new Menu();
|
47
|
+
$menus = new Menu();
|
34
48
|
|
35
49
|
?>
|
36
50
|
|
@@ -68,6 +82,10 @@
|
|
68
82
|
|
69
83
|
</html>
|
70
84
|
|
85
|
+
```
|
86
|
+
|
87
|
+
|
88
|
+
|
71
89
|
|
72
90
|
|
73
91
|
Menuクラス内で$orderCountをprivateで指定しているにも関わらず、
|