28 lines
992 B
PHP
28 lines
992 B
PHP
<?php
|
|
/**
|
|
* Bootstrap Doctrine.php, register autoloader specify
|
|
* configuration attributes and load models.
|
|
*/
|
|
require_once 'Doctrine.php';
|
|
spl_autoload_register(array('Doctrine', 'autoload'));
|
|
$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 );
|
|
/*
|
|
$manager->setCollate('utf8_unicode_ci');
|
|
$manager->setCharset('utf8');
|
|
*/
|
|
|
|
|
|
$graydonConn = Doctrine_Manager::connection('mysql://'.MYSQL_USER.':'.MYSQL_PASS.'@'.MYSQL_HOST.'/graydon', 'graydon');
|
|
|
|
|
|
$intersudConn = Doctrine_Manager::connection('mysql://'.MYSQL_USER.':'.MYSQL_PASS.'@'.MYSQL_HOST.'/intersud', 'intersud');
|
|
/*
|
|
$connection->setCollate('utf8_unicode_ci');
|
|
$connection->setCharset('utf8');
|
|
*/
|
|
Doctrine::loadModels(realpath(dirname(__FILE__)).'/models/graydon');
|
|
$manager->setCurrentConnection('graydon');
|
|
?>
|