@@ 56-72 (lines=17) @@ | ||
53 | $this->storeInUtc = $this->moufManager->getVariable('tdbmDefaultStoreInUtc'); |
|
54 | } |
|
55 | ||
56 | if ($this->daoNamespace == null && $this->beanNamespace == null) { |
|
57 | $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../../../composer.json'); |
|
58 | ||
59 | $autoloadNamespaces = $classNameMapper->getManagedNamespaces(); |
|
60 | if ($autoloadNamespaces) { |
|
61 | $this->autoloadDetected = true; |
|
62 | $rootNamespace = $autoloadNamespaces[0]; |
|
63 | $this->daoNamespace = $rootNamespace.'Dao'; |
|
64 | $this->beanNamespace = $rootNamespace.'Dao\\Bean'; |
|
65 | } else { |
|
66 | $this->autoloadDetected = false; |
|
67 | $this->daoNamespace = 'YourApplication\\Dao'; |
|
68 | $this->beanNamespace = 'YourApplication\\Dao\\Bean'; |
|
69 | } |
|
70 | } else { |
|
71 | $this->autoloadDetected = true; |
|
72 | } |
|
73 | ||
74 | $this->content->addFile(dirname(__FILE__).'/../../../../views/tdbmGenerate.php', $this); |
|
75 | $this->template->toHtml(); |
@@ 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.'Dao'; |
|
118 | $this->beanNamespace = $rootNamespace.'Dao\\Bean'; |
|
119 | } else { |
|
120 | $this->autoloadDetected = false; |
|
121 | $this->daoNamespace = 'YourApplication\\Dao'; |
|
122 | $this->beanNamespace = 'YourApplication\\Dao\\Bean'; |
|
123 | } |
|
124 | } else { |
|
125 | $this->autoloadDetected = true; |
|
126 | } |
|
127 | ||
128 | $this->castDatesToDateTime = true; |
|
129 |