\n"; exit(1); } $base = $argv[1]; $chemin = $argv[2]; if (file_exists($chemin) == false) { mkdir($chemin); } $dsn = 'mysql://'.MYSQL_USER.':'.MYSQL_PASS.'@'.MYSQL_HOST; ${$base.'Conn'} = Doctrine_Manager::connection($dsn.'/'.$base, $base); $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($base); print_r(Doctrine::generateModelsFromDb($chemin.'/'.$base, array($base))); ?>