| @@ 116-132 (lines=17) @@ | ||
| 113 | $this->daoNamespace = $this->moufManager->getVariable('tdbmDefaultDaoNamespace_tdbmService'); |
|
| 114 | $this->beanNamespace = $this->moufManager->getVariable('tdbmDefaultBeanNamespace_tdbmService'); |
|
| 115 | ||
| 116 | if ($this->daoNamespace == null && $this->beanNamespace == null) { |
|
| 117 | $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../../../composer.json'); |
|
| 118 | ||
| 119 | $autoloadNamespaces = $classNameMapper->getManagedNamespaces(); |
|
| 120 | if ($autoloadNamespaces) { |
|
| 121 | $this->autoloadDetected = true; |
|
| 122 | $rootNamespace = $autoloadNamespaces[0]; |
|
| 123 | $this->daoNamespace = $rootNamespace.'Dao'; |
|
| 124 | $this->beanNamespace = $rootNamespace.'Dao\\Bean'; |
|
| 125 | } else { |
|
| 126 | $this->autoloadDetected = false; |
|
| 127 | $this->daoNamespace = 'YourApplication\\Dao'; |
|
| 128 | $this->beanNamespace = 'YourApplication\\Dao\\Bean'; |
|
| 129 | } |
|
| 130 | } else { |
|
| 131 | $this->autoloadDetected = true; |
|
| 132 | } |
|
| 133 | $this->defaultPath = true; |
|
| 134 | $this->storePath = ''; |
|
| 135 | ||
| @@ 60-76 (lines=17) @@ | ||
| 57 | $this->composerFile = $this->moufManager->getVariable('tdbmDefaultComposerFile'); |
|
| 58 | } |
|
| 59 | ||
| 60 | if ($this->daoNamespace == null && $this->beanNamespace == null) { |
|
| 61 | $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../../../composer.json'); |
|
| 62 | ||
| 63 | $autoloadNamespaces = $classNameMapper->getManagedNamespaces(); |
|
| 64 | if ($autoloadNamespaces) { |
|
| 65 | $this->autoloadDetected = true; |
|
| 66 | $rootNamespace = $autoloadNamespaces[0]; |
|
| 67 | $this->daoNamespace = $rootNamespace.'Dao'; |
|
| 68 | $this->beanNamespace = $rootNamespace.'Dao\\Bean'; |
|
| 69 | } else { |
|
| 70 | $this->autoloadDetected = false; |
|
| 71 | $this->daoNamespace = 'YourApplication\\Dao'; |
|
| 72 | $this->beanNamespace = 'YourApplication\\Dao\\Bean'; |
|
| 73 | } |
|
| 74 | } else { |
|
| 75 | $this->autoloadDetected = true; |
|
| 76 | } |
|
| 77 | ||
| 78 | $this->content->addFile(dirname(__FILE__).'/../../../../views/tdbmGenerate.php', $this); |
|
| 79 | $this->template->toHtml(); |
|