Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

allow baseClass values with namespaces #484

Merged
merged 1 commit into from

2 participants

@havvg

Well, tests are completely missing for the whole feature :(

@willdurand willdurand commented on the diff
generator/lib/builder/om/PHP5ObjectBuilder.php
((5 lines not shown))
$parentClass = $this->getBehaviorContent('parentClass');
$parentClass = (null !== $parentClass) ? $parentClass : ClassTools::classname($this->getBaseClass());
+ if (false === strpos($this->getBaseClass(), '.')) {
@willdurand Owner

. ?

Which value do you put in the baseClass property?

@havvg
havvg added a note

I put in Ormigo\Model\BaseObject, the default value is propel.om.BaseObject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@willdurand willdurand merged commit 080c4bb into propelorm:master

1 check passed

Details default The Travis build passed
@willdurand
Owner

Merged, thanks.

@havvg havvg deleted the havvg:feature/baseclass-namespace branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 9, 2012
  1. @havvg
This page is out of date. Refresh to see the latest.
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(), '.')) {
@willdurand Owner

. ?

Which value do you put in the baseClass property?

@havvg
havvg added a note

I put in Ormigo\Model\BaseObject, the default value is propel.om.BaseObject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ $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'
);
Something went wrong with that request. Please try again.