1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +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 string $directory
* @param array $databases * @param array $databases
* @return array the names of the imported classes
*/ */
public function import($directory, array $databases = array()) public function import($directory, array $databases = array())
{ {
$builder = new Doctrine_Import_Builder(); $builder = new Doctrine_Import_Builder();
$builder->setTargetPath($directory); $builder->setTargetPath($directory);
$classes = array();
foreach ($this->listTables() as $table) { foreach ($this->listTables() as $table) {
$builder->buildRecord($table, $this->listTableColumns($table)); $builder->buildRecord($table, $this->listTableColumns($table));
$classes[] = Doctrine::classify($table);
} }
return $classes;
} }
} }