-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
53 lines (39 loc) · 1.39 KB
/
index.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
<?php
/**
* SAAN FRAMEWORK
*
* @project: Core SAAN Framework
* @purpose: This is the Index file and this will act as the entry point for the application.
*
* @author: Saurabh Sinha
* @created on: 12/30/12 11:33 AM
*
* @url: www.saaninfotech.com
* @email: info@saaninfotech.com
* @license: SAAN INFOTECH
*
*/
/***********************************************************************/
require_once("bootstrap.php");
//This creates the new registry for the application.
$registry = new registry;
//This creates the database registry object.
$registry->db = new Database($__host, $__user, $__password, $__database);
//This initializes the router of the application.
$registry->router = new router($registry);
//This initializes the required model.
$registry->model = new SaanModel($registry->db, $registry->router->getFile());
//This initializes the specified template
$registry->template = new template($registry);
//This initializes the Validation Class
$registry->validation = new Validation();
//This initialize the Security Class
$registry->security = new Security();
//This initializes the Image Resize Class
$registry->image = new ImageResize();
//This initializes the Mailer Class
$registry->mailer = Swift_Mailer::newInstance($transport);
//This sets the DB for the Static Model Class
appModel::setDB($registry->db);
//This initializes the required Controller.
$registry->router->dispatch();