extranet/includes/dbbootstrap.php
2009-05-04 14:26:54 +00:00

13 lines
585 B
PHP

<?php
/**
* Bootstrap Doctrine.php, register autoloader specify
* configuration attributes and load models.
*/
require_once 'Doctrine.php';
spl_autoload_register(array('Doctrine', 'autoload'));
$conn = Doctrine_Manager::connection('mysql://'.MYSQL_USER.':'.MYSQL_PASS.'@'.MYSQL_HOST.'/graydon', 'doctrine');
$manager = Doctrine_Manager::getInstance();
$manager->setAttribute( Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);
$manager->setAttribute( Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, TRUE );
$manager->setAttribute( Doctrine::ATTR_USE_NATIVE_ENUM, TRUE);
?>