-
Notifications
You must be signed in to change notification settings - Fork 1
/
base.php
executable file
·89 lines (80 loc) · 2.5 KB
/
base.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* application_controller_base
*
* Basis Klasse controller
*/
class controller_base extends base
{
public function __construct($class)
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
app::init_controller($class);
}
public function __destruct()
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
}
public function generate_html_output()
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
/*
* @FIXME: tidy vs font-awesome issues :(
* disabled tidy
*/
//ob_start();
//require_once(view::get_special("core"));
//app::$tidy->parseString(ob_get_contents(), app::$tidy_opts);
//ob_end_clean();
//app::$tidy->cleanRepair();
//app::$output = app::$tidy;
ob_start();
require_once(view::get_special("core"));
app::$output = ob_get_contents();
ob_end_clean();
}
public function generate_special_output($type)
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
ob_start();
require_once(view::get_special($type));
app::$output = ob_get_contents();
ob_end_clean();
}
public function generate_cli_output()
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
ob_start();
require_once(view::get_special("core"));
app::$output = ob_get_contents();
ob_end_clean();
}
protected function add_controller_inc($class)
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."($class) betreten.");
if(cfg::$template != "default")
{
$template_js = model_controllerinc::get_inc_by_template_controller_type
(
cfg::$template, $class, 'js'
);
app::$inc->js = array_unique(array_merge(app::$inc->js, $template_js));
$template_css = model_controllerinc::get_inc_by_template_controller_type
(
cfg::$template, $class, 'css'
);
app::$inc->css = array_unique(array_merge(app::$inc->css, $template_css));
}
$template_js = model_controllerinc::get_inc_by_template_controller_type
(
"default", $class, 'js'
);
app::$inc->js = array_unique(array_merge(app::$inc->js, $template_js));
$template_css = model_controllerinc::get_inc_by_template_controller_type
(
"default", $class, 'css'
);
app::$inc->css = array_unique(array_merge(app::$inc->css, $template_css));
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."($class):<br /><b>app::\$inc:</b><br /><pre>".var_export(app::$inc, true)."</pre>");
}
}