-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfig.php
More file actions
23 lines (16 loc) · 806 Bytes
/
config.php
File metadata and controls
23 lines (16 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
//require the base Doctrine class
require_once(dirname(__FILE__) . '/lib/Doctrine.php');
require_once(dirname(__FILE__) . '/controllers/controller.php');
//register the autoloader
spl_autoload_register(array('Doctrine', 'autoload'));
$database_username = urlencode($database_username);
$database_password = urlencode($database_password);
// Setup the DSN
$dsn = "$database_type://$database_username:$database_password@$database_hostname:$database_port/$database_default";
// initialize a new Doctrine_Connection
$conn = Doctrine_Manager::connection($dsn);
// Setup conservative (on demand) model loading
Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);
// Load our models
Doctrine::loadModels(dirname(__FILE__) . '/models');