42
42
*/
43
43
class CodonModule
44
44
{
45
- public static $ post ;
46
- public static $ get ;
47
- public static $ controller ;
48
- public static $ activeModule ;
45
+ public $ post ;
46
+ public $ get ;
47
+ public $ controller ;
48
+ public $ activeModule ;
49
49
public $ action ;
50
-
50
+
51
51
public $ title ;
52
-
52
+
53
53
public function __construct ()
54
54
{
55
-
55
+
56
56
}
57
-
57
+
58
58
/**
59
59
* Initialize the parent class. Called by the MainController
60
60
* when the module is created
@@ -63,55 +63,55 @@ public function __construct()
63
63
public function init ($ module_name ='' )
64
64
{
65
65
$ module_name = strtolower ($ module_name );
66
-
66
+
67
67
$ this ->post = Vars::$ post ;
68
68
$ this ->get = CodonRewrite::$ get ;
69
69
$ this ->request = Vars::$ request ;
70
70
$ this ->controller = CodonRewrite::$ controller ;
71
-
71
+
72
72
$ this ->init = true ;
73
73
$ this ->activeModule = MainController::$ activeModule ;
74
74
}
75
-
75
+
76
76
public function config ($ setting )
77
77
{
78
78
return Config::Get ($ setting );
79
79
}
80
-
80
+
81
81
public function get ($ name )
82
82
{
83
83
return Template::Get ($ name , true );
84
84
}
85
-
85
+
86
86
public function set ($ name , $ value )
87
87
{
88
88
Template::Set ($ name , $ value );
89
89
}
90
-
90
+
91
91
public function show ($ tpl )
92
92
{
93
93
Template::Show ($ tpl );
94
94
}
95
-
95
+
96
96
public function render ($ tpl )
97
97
{
98
98
Template::Show ($ tpl );
99
99
}
100
-
100
+
101
101
public function log ($ text , $ file ='log ' )
102
102
{
103
103
Debug::log ($ text , $ file );
104
104
}
105
-
105
+
106
106
public function firephp ()
107
107
{
108
108
include_once CORE_PATH .DS .'lib ' .DS .'firebug ' .DS .'FirePHP.class.php ' ;
109
-
109
+
110
110
$ instance = FirePHP::getInstance (true );
111
111
$ args = func_get_args ();
112
112
return call_user_func_array (array ($ instance ,'fb ' ),$ args );
113
113
}
114
-
114
+
115
115
public function callHook ($ hook_name )
116
116
{
117
117
if (file_exists (SITE_ROOT .'/core/hooks/ ' .$ hook_name ))
0 commit comments