-
Notifications
You must be signed in to change notification settings - Fork 8
/
kissmvc.php
39 lines (30 loc) · 1.07 KB
/
kissmvc.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
<?php
require('kissmvc_core.php');
//===============================================================
// Model/ORM
//===============================================================
class Model extends KISS_Model {
//Example of adding your own method to the core class
function gethtmlsafe($key) {
return htmlspecialchars($this->get($key));
}
}
//===============================================================
// Controller
//===============================================================
class Controller extends KISS_Controller {
//Example of overriding a core class method with your own
function request_not_found() {
die(View::do_fetch(VIEW_PATH.'errors/404.php'));
}
}
//===============================================================
// View
//===============================================================
class View extends KISS_View {
//Example of overriding a constructor/method, add some code then pass control back to parent
function __construct($file='',$vars='') {
$file = VIEW_PATH.$file;
return parent::__construct($file,$vars);
}
}