This commit is contained in:
parent
5718cbb16c
commit
bef66f5b4a
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue