removed loop, added direct paths
This commit is contained in:
parent
43b7711f94
commit
ed71a9f1be
1 changed files with 12 additions and 13 deletions
|
|
@ -62,19 +62,18 @@ abstract class AbstractDataHandler
|
|||
|
||||
$this->dbMap = Propel::getDatabaseMap($connectionName);
|
||||
if (0 === count($this->dbMap->getTables())) {
|
||||
foreach (array('src', 'vendor') as $path) {
|
||||
$finder = new Finder();
|
||||
$files = $finder->files()->name('*TableMap.php')
|
||||
->in($this->getRootDir() . '/../' . $path)
|
||||
->exclude('PropelBundle')
|
||||
->exclude('Tests');
|
||||
$finder = new Finder();
|
||||
$files = $finder->files()->name('*TableMap.php')
|
||||
->in($this->getRootDir() . '/../src/')
|
||||
->in($this->getRootDir() . '/../vendor/')
|
||||
->exclude('PropelBundle')
|
||||
->exclude('Tests');
|
||||
|
||||
foreach ($files as $file) {
|
||||
$class = $this->guessFullClassName($file->getRelativePath(), basename($file, '.php'));
|
||||
foreach ($files as $file) {
|
||||
$class = $this->guessFullClassName($file->getRelativePath(), basename($file, '.php'));
|
||||
|
||||
if (null !== $class) {
|
||||
$this->dbMap->addTableFromMapClass($class);
|
||||
}
|
||||
if (null !== $class && $this->isInDatabase($class, $connectionName)) {
|
||||
$this->dbMap->addTableFromMapClass($class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue