1
0
Fork 0
mirror of synced 2025-04-01 20:36:14 +03:00
This commit is contained in:
zYne 2007-06-19 23:28:39 +00:00
parent 5718cbb16c
commit bef66f5b4a

View file

@ -181,14 +181,20 @@ class Doctrine_Import extends Doctrine_Connection_Module
*
* @param string $directory
* @param array $databases
* @return array the names of the imported classes
*/
public function import($directory, array $databases = array())
{
$builder = new Doctrine_Import_Builder();
$builder->setTargetPath($directory);
$classes = array();
foreach ($this->listTables() as $table) {
$builder->buildRecord($table, $this->listTableColumns($table));
$classes[] = Doctrine::classify($table);
}
return $classes;
}
}