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