Skip to content
This repository
Browse code

remove parameters basePrefix and namespaceOm

  • Loading branch information...
commit 87c48c613aa602c833f0a80c75674e8abc43b535 1 parent 360f890
Jérémie Augustin jaugustin authored
6 src/Propel/Generator/Builder/Om/ObjectBuilder.php
@@ -45,10 +45,6 @@ public function getPackage()
45 45 public function getNamespace()
46 46 {
47 47 if ($namespace = parent::getNamespace()) {
48   - if ($this->getGeneratorConfig() && $omns = $this->getGeneratorConfig()->getBuildProperty('namespaceOm')) {
49   - return $namespace . '\\' . $omns;
50   - }
51   -
52 48 return $namespace . '\\Base';
53 49 }
54 50
@@ -61,7 +57,7 @@ public function getNamespace()
61 57 */
62 58 public function getUnprefixedClassname()
63 59 {
64   - return $this->getBuildProperty('basePrefix') . $this->getStubObjectBuilder()->getUnprefixedClassname();
  60 + return $this->getStubObjectBuilder()->getUnprefixedClassname();
65 61 }
66 62
67 63 /**
11 src/Propel/Generator/Builder/Om/PeerBuilder.php
@@ -57,8 +57,7 @@ protected function validateModel()
57 57 */
58 58 public function getUnprefixedClassname()
59 59 {
60   - return $this->getBuildProperty('basePrefix')
61   - . $this->getStubPeerBuilder()->getUnprefixedClassname();
  60 + return $this->getStubPeerBuilder()->getUnprefixedClassname();
62 61 }
63 62
64 63 /**
@@ -73,14 +72,10 @@ public function getPackage()
73 72 public function getNamespace()
74 73 {
75 74 if ($namespace = parent::getNamespace()) {
76   - if ($this->getGeneratorConfig() && $omns = $this->getGeneratorConfig()->getBuildProperty('namespaceOm')) {
77   - return $namespace . '\\' . $omns;
78   - } else {
79 75 return $namespace . '\\Base';
80   - }
81   - } else {
82   - return 'Base';
83 76 }
  77 +
  78 + return 'Base';
84 79 }
85 80
86 81 /**
10 src/Propel/Generator/Builder/Om/QueryBuilder.php
@@ -35,14 +35,10 @@ public function getPackage()
35 35 public function getNamespace()
36 36 {
37 37 if ($namespace = parent::getNamespace()) {
38   - if ($this->getGeneratorConfig() && $omns = $this->getGeneratorConfig()->getBuildProperty('namespaceOm')) {
39   - return $namespace . '\\' . $omns;
40   - } else {
41 38 return $namespace . '\\Base';
42   - }
43   - } else {
44   - return 'Base';
45 39 }
  40 +
  41 + return 'Base';
46 42 }
47 43
48 44 /**
@@ -51,7 +47,7 @@ public function getNamespace()
51 47 */
52 48 public function getUnprefixedClassname()
53 49 {
54   - return $this->getBuildProperty('basePrefix') . $this->getStubQueryBuilder()->getUnprefixedClassname();
  50 + return $this->getStubQueryBuilder()->getUnprefixedClassname();
55 51 }
56 52
57 53 /**
12 src/Propel/Generator/Builder/Om/QueryInheritanceBuilder.php
@@ -35,7 +35,7 @@ class QueryInheritanceBuilder extends AbstractOMBuilder
35 35 */
36 36 public function getUnprefixedClassname()
37 37 {
38   - return $this->getBuildProperty('basePrefix') . $this->getNewStubQueryInheritanceBuilder($this->getChild())->getUnprefixedClassname();
  38 + return $this->getNewStubQueryInheritanceBuilder($this->getChild())->getUnprefixedClassname();
39 39 }
40 40
41 41 /**
@@ -50,14 +50,10 @@ public function getPackage()
50 50 public function getNamespace()
51 51 {
52 52 if ($namespace = parent::getNamespace()) {
53   - if ($this->getGeneratorConfig() && $omns = $this->getGeneratorConfig()->getBuildProperty('namespaceOm')) {
54   - return $namespace . '\\' . $omns;
55   - } else {
56   - return $namespace;
57   - }
58   - } else {
59   - return 'Base';
  53 + return $namespace . '\\Base';
60 54 }
  55 +
  56 + return 'Base';
61 57 }
62 58
63 59 /**
1  src/Propel/Generator/Command/ModelBuild.php
@@ -117,7 +117,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
117 117 'propel.addTimeStamp' => false,
118 118 'propel.addValidateMethod' => true,
119 119 'propel.addHooks' => true,
120   - 'propel.namespace.om' => 'Base',
121 120 'propel.namespace.map' => 'Map',
122 121 'propel.useLeftJoinsInDoJoinMethods' => true,
123 122 'propel.emulateForeignKeyConstraints' => false,
3  src/Propel/Generator/Util/QuickBuilder.php
@@ -198,9 +198,6 @@ public function getClassesForTable(Table $table, array $classTargets = null)
198 198
199 199 if ($table->getInterface()) {
200 200 $interface = $this->getConfig()->getConfiguredBuilder('interface', $target)->build();
201   - if (false === strpos($class, 'namespace')) {
202   - $interface = "\nnamespace\n{\n" . $interface . "\n}\n";
203   - }
204 201 $script .= $this->fixNamespaceDeclarations($interface);
205 202 }
206 203
1  tools/generator/default.properties
@@ -87,7 +87,6 @@ propel.addSaveMethod = true
87 87 propel.addTimeStamp = false
88 88 propel.addValidateMethod = true
89 89 propel.addHooks = true
90   -propel.basePrefix =
91 90 propel.saveException = \Propel\Generator\Exception\PropelException
92 91 propel.emulateForeignKeyConstraints = false
93 92

0 comments on commit 87c48c6

Please sign in to comment.
Something went wrong with that request. Please try again.