Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #484 from havvg/feature/baseclass-namespace

allow baseClass values with namespaces
  • Loading branch information...
commit 080c4bbac5c00ed148768555bc61d9fe57c657c4 2 parents 88febad + 2b575ab
@willdurand willdurand authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 generator/lib/builder/om/PHP5ObjectBuilder.php
View
9 generator/lib/builder/om/PHP5ObjectBuilder.php
@@ -192,10 +192,15 @@ protected function addClassOpen(&$script)
$table = $this->getTable();
$tableName = $table->getName();
$tableDesc = $table->getDescription();
- $interface = $this->getInterface();
$parentClass = $this->getBehaviorContent('parentClass');
$parentClass = (null !== $parentClass) ? $parentClass : ClassTools::classname($this->getBaseClass());
+ if (false === strpos($this->getBaseClass(), '.')) {
+ $this->declareClass($this->getBaseClass());
+ } else {
+ $this->declareClass($parentClass);
+ }
+
if ($this->getBuildProperty('addClassLevelComment')) {
$script .= "
/**
@@ -247,7 +252,7 @@ protected function addClassBody(&$script)
$this->declareClassFromBuilder($this->getStubQueryBuilder());
$this->declareClasses(
'Propel', 'PropelException', 'PDO', 'PropelPDO', 'Criteria',
- 'BaseObject', 'Persistent', 'BasePeer', 'PropelCollection',
+ 'Persistent', 'BasePeer', 'PropelCollection',
'PropelObjectCollection', 'Exception'
);
Please sign in to comment.
Something went wrong with that request. Please try again.