extranet/www/dashboard/generate.php

19 lines
1.0 KiB
PHP
Raw Normal View History

2009-05-04 14:26:54 +00:00
<?php
require_once realpath(dirname(__FILE__)).'/../../config/prepend.php';
require_once 'Doctrine.php';
spl_autoload_register(array('Doctrine', 'autoload'));
$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');
$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->setCurrentConnection('graydon');
Doctrine::generateModelsFromDb(realpath(dirname(__FILE__)).'/models/graydon', array('graydon'), array('generateTableClasses' => true));
$manager->setCurrentConnection('intersud');
Doctrine::generateModelsFromDb(realpath(dirname(__FILE__)).'/models/intersud', array('intersud'), array('generateTableClasses' => true));
2009-05-04 14:26:54 +00:00
?>