-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wildcard aliases #46
base: master
Are you sure you want to change the base?
Wildcard aliases #46
Conversation
@@ -60,6 +60,14 @@ public function getTypeAlias($type, Schema $schemapos = null) | |||
if (isset($this->typeAliases[$schema->getTargetNamespace()][$type->getName()])) { | |||
return $this->aliasCache[$cid] = call_user_func($this->typeAliases[$schema->getTargetNamespace()][$type->getName()], $type); | |||
} | |||
|
|||
if (!empty($this->typeAliases[$schema->getTargetNamespace()])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be moved to a private
method and documented
$class = array(); | ||
$data = array(); | ||
|
||
if (($alias = $this->getTypeAlias($element))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be moved to a private
method as well
@@ -155,6 +155,15 @@ public function visitElementDef(ElementDef $element, $skip = false) | |||
$class->setName($this->getNamingStrategy()->getItemName($element)); | |||
$class->setDoc($element->getDoc()); | |||
|
|||
if ($alias = $this->getTypeAlias($element)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here - private
method to be added
allow wildcard aliasing and aliasing of elements