Fixed ComplexType without alias name

Fix issue #17
This commit is contained in:
Francis Besset 2013-10-17 13:49:24 +02:00
parent 95efa3e366
commit 54894b2fd9
2 changed files with 4 additions and 4 deletions

View File

@ -181,7 +181,7 @@ class AnnotationClassLoader extends Loader
} }
$loaded = $complexTypeResolver->load($phpType); $loaded = $complexTypeResolver->load($phpType);
$complexType = new ComplexType($phpType, $loaded['alias']); $complexType = new ComplexType($phpType, isset($loaded['alias']) ? $loaded['alias'] : $phpType);
foreach ($loaded['properties'] as $name => $property) { foreach ($loaded['properties'] as $name => $property) {
$complexType->add($name, $this->loadType($property->getValue()), $property->isNillable()); $complexType->add($name, $this->loadType($property->getValue()), $property->isNillable());
} }

View File

@ -21,10 +21,10 @@ class ComplexType extends Message implements TypeInterface
{ {
public function __construct($phpType, $xmlType) public function __construct($phpType, $xmlType)
{ {
parent::__construct($xmlType);
$this->phpType = $phpType; $this->phpType = $phpType;
$this->xmlType = $xmlType; $this->xmlType = str_replace('\\', '.', $xmlType);
parent::__construct($xmlType);
} }
public function getPhpType() public function getPhpType()