-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmvc_init.php
More file actions
34 lines (23 loc) · 1.02 KB
/
mvc_init.php
File metadata and controls
34 lines (23 loc) · 1.02 KB
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
<?php
/*** include the controller class ***/
include __SITE_PATH . '/system/' . 'baseController.class.php';
/*** include the model class ***/
include __SITE_PATH . '/system/' . 'baseModel.class.php';
/*** include the registry class ***/
include __SITE_PATH . '/system/' . 'registry.class.php';
/*** include the router class ***/
include __SITE_PATH . '/system/' . 'router.class.php';
/*** include config ***/
include __SITE_PATH . '/config/' . 'config.php';
include __SITE_PATH . '/system/' . 'configObject.class.php';
/*** include loader ***/
include __SITE_PATH . '/system/' . 'load.class.php';
// a new registry object
$registry = new registry;
// add PDO database
$registry->db = ( $config['db']['doLoad'] ) ? new PDO( "mysql:host=" . $config['db']['server'] . ";dbname=" . $config['db']['database'], $config['db']['username'], $config['db']['password'] ) : FALSE;
// add config
$registry->config = new configObject( $config );
// add loader
$registry->load = new load( $registry->config );
?>