回答編集履歴
4
インデント修正
test
CHANGED
@@ -68,17 +68,19 @@
|
|
68
68
|
|
69
69
|
|
70
70
|
|
71
|
-
|
71
|
+
/**
|
72
72
|
|
73
|
-
|
73
|
+
* @var string page template
|
74
74
|
|
75
|
-
|
75
|
+
*/
|
76
76
|
|
77
|
-
|
77
|
+
public $template = 'template';
|
78
78
|
|
79
79
|
|
80
80
|
|
81
|
+
// 親子で利用できる変数
|
82
|
+
|
81
|
-
|
83
|
+
protected $hogehage = "test";
|
82
84
|
|
83
85
|
|
84
86
|
|
3
fuel風に修正
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
```
|
32
32
|
|
33
|
-
class
|
33
|
+
class Controller_Hoge extends Controller_Template
|
34
34
|
|
35
35
|
{
|
36
36
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
```
|
92
92
|
|
93
|
-
class
|
93
|
+
class Controller_Hoge extends Controller_Template
|
94
94
|
|
95
95
|
{
|
96
96
|
|
2
訂正
test
CHANGED
@@ -57,3 +57,57 @@
|
|
57
57
|
|
58
58
|
|
59
59
|
親の方に定義するんでしたね…
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
```
|
64
|
+
|
65
|
+
abstract class Controller_Template extends \Controller
|
66
|
+
|
67
|
+
{
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
/**
|
72
|
+
|
73
|
+
* @var string page template
|
74
|
+
|
75
|
+
*/
|
76
|
+
|
77
|
+
public $template = 'template';
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
protected $hogehage = "test";
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
```
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
```
|
92
|
+
|
93
|
+
class HogeController extends Controller_Template
|
94
|
+
|
95
|
+
{
|
96
|
+
|
97
|
+
public function action_hoge()
|
98
|
+
|
99
|
+
{
|
100
|
+
|
101
|
+
echo $this->hogehage;
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
```
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
こんな感じですね。
|
112
|
+
|
113
|
+
|
1
修正
test
CHANGED
@@ -53,3 +53,7 @@
|
|
53
53
|
|
54
54
|
|
55
55
|
こんな感じですね。
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
親の方に定義するんでしたね…
|